Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Okay so I am trying to limit a stacked bar chart so that it shows me the top 25 first and then I click on "Others" and shows me the rest as batches of 25. However I believe there is a problem when trying to limit this. The problem is as follows:
I have measure c = c1+c2
I have 2 measures in my stacked bar chart which are c1 and c2 which performs an aggregation and shows me the value of c.
Now when I am trying to limit in batches of 25, it is sorting the bar chart with c1, that is I see the top 25 c1 and then the rest.
However, I want top 25 of C that is the aggregation of C1 & C2. How can I achieve this?
In the screenshot below, you also see that it says: "Calculated on measure CY Billed Amount" which is C1 in my example above. But I want this to show me top 25 C first.
Hope I made sense.
yes there is a work around
you can create a calculated dimension
something in the line :
aggr(if(rank(c1+c2)<=25,dimension,'Other),dimension)
Limiting dimension always work on 1st measure.
Correct and thanks for confirming.
I understand that. What I am looking for is, will I be able to specify a measure which I have not added in the bar chart to do the limitation?
The measure C is not in the bar chart but can I limit it by measure C? Is there any workaround?
yes there is a work around
you can create a calculated dimension
something in the line :
aggr(if(rank(c1+c2)<=25,dimension,'Other),dimension)
Ah! Perfect! Very close to the solution I need. Very elegant though! Loved the solution!
The only other thing is that the dimension "Other" now tops my chart in terms of sorting. It is now my number 1, obviously because it has the highest number. But how can I make this the 25th in every batch?
in the sorting
put your dimension as the first sorting order
and sort by expression
use this expression
aggr(if(rank(c1+c2)<=25,c1+c2,-99999),dimension)
and select descending order
You sir are awesome!!