Forum Discussion

AdamMetz23's avatar
AdamMetz23
Advocate I
2 years ago
Solved

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...
  • lkalawski's avatar
    lkalawski
    2 years ago

    AdamMetz23 ,

    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.