Forum Discussion

lynnpowerbi's avatar
lynnpowerbi
Frequent Visitor
3 years ago
Solved

Sort by Top N in bar chart with Multiple Columns

Hi,   I am currently working with a dataset that looks like the following:     Case ID ProcessOutcomeDateTime Error1.1 Error1.2 Error 2.1 Error2.2 Case1 01/01/23 ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    HI lynnpowerbi,

    In fact, power bi does not suitable to calculate across multiple fields, I'd like to suggest you do unpivot column on these value fields, to convert them to attribute and value. Then you can use unpivoted attribute and value fields to accurately control and calculate on these field values based on simple conditions.

    Unpivot columns - Power Query | Microsoft Learn

    For sorting with multiple columns, you can also take a look at the following link to use ISONORAFTER function to write complex condition with multiple fields.      

    Sorting by multiple columns 

    Regards,

    Xiaoxin Sheng