Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to figure out a method of using variable input where i previously only used a single variable TOP or BOTTO to find the top N values. i want to consolidate and use both in a single input where i can specify the N of values and select TOP or BOTTOM and directly show in a single chart.
i was thinking of using rank and aggr. Any hints?
Hello,
I have created a sample, check if that works for you.
vTopBottom : To check if Top is selected or Bottom.
vTopBottomValues : To get input of top/bottom
Expression :
If(vTopBottom = 1,
If(Rank(Sum(Value))<=$(vTopBottomValue),Sum(Value))
,
If(vTopBottom = 2,
If(Rank(-Sum(Value))<=$(vTopBottomValue),Sum(Value))
))
Output :
Thanks,
Ashutosh
Hello,
I have created a sample, check if that works for you.
vTopBottom : To check if Top is selected or Bottom.
vTopBottomValues : To get input of top/bottom
Expression :
If(vTopBottom = 1,
If(Rank(Sum(Value))<=$(vTopBottomValue),Sum(Value))
,
If(vTopBottom = 2,
If(Rank(-Sum(Value))<=$(vTopBottomValue),Sum(Value))
))
Output :
Thanks,
Ashutosh
what limitation did you use in the table itself?
also i am having issues with the expression
Hello,
Sum(Value) is a KPI in my dataset.
Use KPI as per your dataset and try.
No limitation is used in tables, Row limit is managed using Rank() function
Hi,
In the screenshot, Value KPI is used. which is not present in your dataset.
Also, looks like vTopBottomValue variable in not getting calculated.
Please check that in KPI object if that works on button selection.
Thanks,
Ashutosh
yes it works. I was having some functional issues on my end. thank you very much.
Great 🙂