Solved

Grouping attribute values and then using the group to filter data

  • 26 July 2023
  • 4 replies
  • 49 views

Hello,

I need to create a groups which consist of atribute values. Then I want to use this group as a filter for my dashboard. How do I do that?

 

Example:

attribute=regions

new attribute=states (groups of regions)

filter = filters dashboard by states

 

Thank you

icon

Best answer by Francisco Antunes 26 July 2023, 15:28

View original

4 replies

Hello Anastasie,

I understand what you would like to do here. I’m afraid that it is not possible to configure that on GoodData’s end; that would have to be set up on your Source Data by creating an additional attribute (i.e., a new column) and assigning the values there.

Using your example, imagine you have on your source data a table with the columns 

Region City id

 

To be able to filter by States would be necessary to add this value as a column to the table, assigning a state to each row, so that it would consist of:

State Region City id

 

Thus creating a new Attribute on the Dataset corresponding to this table, which you could use to filter your insights and dashboards.

 

The filters rely on the existence of the attribute they are filtering in the Datasets. In fact, I would argue that a group of attributes is just another attribute, with different granularity. The article Filters in the GoodData Platform has some additional information about using filters in GoodData, feel free to take a look there too!

 

Best,

Francisco

Hello Francisco,

Thank you very much for your answer. How would you approach this hypotheticaly one city could be assigned to multiple regions?

 

Thank you

Anastasie

Hi Anastasie,

In such a case, you would be working with a Many-to-Many relationship (i.e., regions have multiple cities in them, but cities may also be assigned to multiple regions). 

It can be complex to configure, but our article Many-to-Many in Logical Data Models is a good starting point for the different ways of setting it up. Please take a look there. But the short of it is that the Regions would have to be in a different Dataset, connected to the original one with a M:N relationship.

 

Francisco

I see, this actually helped. Thanks a lot Francisco!

 

Anastasie

Reply