Forum Discussion
Anonymous
7 years agoNot applicable
Clustered Bar Chart Sorting
Hi All, I'm trying to sort the clustered bar chart based with below sample dataset in Power Bi, Customer Group Sales AA A 500 AB A 50 AC A 200 AD A 2000 BB B 10...
- 7 years ago
Hi Anonymous ,
Add a calculated column to above sample dataset.
Rank Col = COUNTROWS ( FILTER ( Test_9, Test_9[Sales ] <= EARLIER ( Test_9[Sales ] ) && Test_9[Group] = EARLIER ( Test_9[Group] ) ) )Choose [Customer] field, click "Sort by Column", choose "Rank Col" from the list.
Chart preview.
Best regards,
Yuliana Gu
v-yulgu-msft
7 years agoMicrosoft Employee
Hi Anonymous ,
Add a calculated column to above sample dataset.
Rank Col =
COUNTROWS (
FILTER (
Test_9,
Test_9[Sales ] <= EARLIER ( Test_9[Sales ] )
&& Test_9[Group] = EARLIER ( Test_9[Group] )
)
)
Choose [Customer] field, click "Sort by Column", choose "Rank Col" from the list.
Chart preview.
Best regards,
Yuliana Gu
Anonymous
7 years agoNot applicable
Thanks a lot for the recommendations. It's a good idea but unfortunately it won't work for my case as the "Sales" is a measures.