Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello I would like in my report to limi the number of brands represented (at the moment they are more than 100). I would like to select the top 5 brands given this measurement:
(sum({$<year={$(=GetFieldSelections(year))}>} sales_units) / sum({$<year={$(=GetFieldSelections(year))}>} total <month> sales_units))
The expression above computes the market share for a given year (the one selected with the filter).
I would like to find the top 5 brands that have the highest value for that measurement and so to filter all across my dashboard and visualize data only for those brands.
Over time the brands could change, so I need a dynamic solution. Does any of u guys know how to do this?
Hello,
you could try something like
if(
Rank(
(sum({$<year={$(=GetFieldSelections(year))}>} sales_units) / sum({$<year={$(=GetFieldSelections(year))}>} total <month> sales_units))<=5,
(sum({$<year={$(=GetFieldSelections(year))}>} sales_units) / sum({$<year={$(=GetFieldSelections(year))}>} total <month> sales_units))
)