Forum Discussion
rashesh
3 years agoFrequent Visitor
Dynamic Sorting stacked bar chart based on slicer value
I have one slicer and 3 Stacked bar charts and this bar chart contains only X-axis and legends. In my slicer, I have values like 1,2,3,4 when I select 1 or 2, or 3 my stacked bar chart should sort a...
ValtteriN
Community Champion
3 years agoHi,
Here is one way to do this:
1. create measure:
Dynamic sort = var _val = MAX('Table 6'[Value]) return
SWITCH(TRUE(),
_val in {1,2,3}, MAX('Table (10)'[Column1]),
_val = 4, MAX('Table (10)'[Column2]))
Here table 6 = slicer values
Table (10) = column chart fact table
Data:
Table (10) = column chart fact table
Data:
2. place the measure in a tooltip:
3. Select sorting to happen based on this measure (... in the top right of the chart)
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/