Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts - I have a chart... Am trying to figure out whether we have an option like.. On click of an button, My dimension (which is sorted based on my expression) should change from Asc to Desc and vice versa...
Regards
Bharani
Check the attached sample
You can do that using a sort expression within your chart and a variable...Basically, based on a variable value, you can change the sort expression like this
If(vVar = 1, Sum(Measure), -Sum(Measure))
Check the attached sample
Wowwwww!! U r an Star!! TY so much!!
Will try to incorporate in my DB and let u know how it goes ..
Hi Bharani,
I'd like to contribute something which works along with Sunny's solution.
Create a button with text : =if($(vVar) = 1,'Asc','Desc')
and give it the action to change the variable vVar to: =1-$(vVar)
Clicking this button will toggle the value of the variable between 1 and 0 and change the sort order in your chart.
Cheers
Andrew
TY Walker for taking your time to post this!!
I was not able click on that "Mark as Helpful" as it keeps on loading.. Any ways Thanks..
Hey Andrew -
Where exactly do we add this expression? Can you update my sample to show how it would work?
Thanks,
Sunny
as action on click:
You only need to set vVar initially to either 0 or -1 ...
Where will this go?
=if($(vVar) = 1,'Asc','Desc')