Forum Discussion
AdamMetz23
2 years agoAdvocate I
Sorting column chart X axis by two level hierarchies
Dear Power BI Community. Can you please help me with the following issue if you have seen similar situation before? Situation snippet: Here are values on a column chart. the measure values (3...
- 2 years ago
It's sometimes hard to find the problem without knowing the data model, but try using this code for a second sort:
RANK ( SKIP, ALLSELECTED ( 'Table' ), ORDERBY ( 'Table'[Value], DESC, 'Table'[Group], ASC ), LAST, PARTITIONBY ( 'Table'[Group] ) )This code does ranking based on values and partitions by groups.
lkalawski
2 years agoResident Rockstar
It's sometimes hard to find the problem without knowing the data model, but try using this code for a second sort:
RANK (
SKIP,
ALLSELECTED ( 'Table' ),
ORDERBY ( 'Table'[Value], DESC, 'Table'[Group], ASC ),
LAST,
PARTITIONBY ( 'Table'[Group] )
)This code does ranking based on values and partitions by groups.
AdamMetz23
2 years agoAdvocate I
lkalawski , Thank you.
I have modified your original DAX a bit my adding ALLSELECTED to the _valueranking variable and it works perfectly now.
Thank you for your help once again and have a great weekend 🙂