Forum Discussion
Anonymous
6 years agoNot applicable
dynamic sort by measure filter
Hi All, how can we achieve below requirement? there is a metric slicer, if i choose 'AVERAGE' the it should sort Average measure by ASC order, elseif i choose 'DISMISSALS' then it should sort Dismi...
- 5 years ago
Hi Anonymous ,
First create a slicer table as below:
Then create 2 measures as below:
Measure = SWITCH(SELECTEDVALUE('Table (2)'[Slicer]),"Average",MAX('Table'[Average ]),"Dismissals",MAX('Table'[Dismissals]),BLANK())Measure 2 = SWITCH(SELECTEDVALUE('Table (2)'[Slicer]),"Average" , RANKX(ALLSELECTED('Table'),'Table'[Measure],,ASC,Dense), "Dismissals", RANKX(ALLSELECTED('Table'),'Table'[Measure],,DESC,Dense))And you will see:(make measure 2 as a tooltip field)
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Anonymous
6 years agoNot applicable
No Amit, using those 3 dots i cannot sort the way i need.
if i choose 'AVERAGE' the it should sort common measure(Measure) by ASC order, elseif i choose 'DISMISSALS' then it should sort common measure(Measure) by DESC order
v-kelly-msft
5 years agoCommunity Support
Hi Anonymous ,
First create a slicer table as below:
Then create 2 measures as below:
Measure =
SWITCH(SELECTEDVALUE('Table (2)'[Slicer]),"Average",MAX('Table'[Average ]),"Dismissals",MAX('Table'[Dismissals]),BLANK())Measure 2 =
SWITCH(SELECTEDVALUE('Table (2)'[Slicer]),"Average" ,
RANKX(ALLSELECTED('Table'),'Table'[Measure],,ASC,Dense),
"Dismissals",
RANKX(ALLSELECTED('Table'),'Table'[Measure],,DESC,Dense))
And you will see:(make measure 2 as a tooltip field)
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Kelly
Did I answer your question? Mark my post as a solution!