Filtering by child table


No matter how hard you try, a time will come when your LDM will look similar to this:

Imagine you have a dataset containing petrol stations and you collect daily prices of the fuel.
So for each petrol station you have multiple prices for the fuel. Thats a nice 1:N relationship.

Creating a report showing average price, sliced by petrol stations is easy.

But - what if you have another dataset containing the list of routes where the petrol stations are located?
Note that there might be multiple routes for multiple petrol stations. Thats a nice M:N relationship. (modeled as 1:N)

So far, so good.

But now, you would like to place the report showing the average price for each petrol station to the dashboard and place a filter of the routes on the same dashboard. And be able to filter by routes.

In theory, that is not possible in GoodData because of the relationships.

Thats the case where filtering by child tables comes into a play.

 Just create a metric that will count the number of ROUTES (its id, or records of) BY id of petrol stations and place it as a numeric range filter that is >0 into your report. (or integrate it directly to your metric)

Thats it!
The filtering on the dashboard should now affect your reports.

Have fun