Forum Discussion

67nmark's avatar
67nmark
Helper I
8 years ago
Solved

custom sort order across multiple columns

Hello,   I am using Power BI to report on survey results data. I have 10 columns with the same answer options (Yes, No, Not sure, NA). I want to set a custom sort order on all columns that use thes...
  • Anonymous's avatar
    Anonymous
    8 years ago

    67nmark,

    In your scenario,  you can create the following sort columns  in your table.

    sort1 = RELATED(Reference[AnswerID])
    sort2 = LOOKUPVALUE(Reference[AnswerID],Reference[AnswerText],Table[Column2])
    sort3 = LOOKUPVALUE(Reference[AnswerID],Reference[AnswerText],Table[Column3])
    ……
    sort10 = LOOKUPVALUE(Reference[AnswerID],Reference[AnswerText],Table[Column10])

    Then you can sort the 10 columns by using these sort columns.

    Regards,
    Lydia