Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

sort multiple measures together

hi,
ref related pbix here.

kindly advise if i can sort the expense / revenue measures together to rank them accordingly. the intended visuals may be table / matrix / pie - donut - stack - column charts.

tks, -nik-

3 Replies

  • Hi Anonymous ,

     

    For doing this you need to do an additional table with your measure names and and ID columns that is used for sorting:

    Measure     -   ID

    Measure_1  - 1

    Measure_2  - 2

    Measure_3   - 3

     

    Sort the measure column by the ID column.

    Now create a new measure with the following syntax:

    Final Measure =
    SWITCH( SELECTEDVALUE(Table[ID]),
    1, [Measure_1],
    2, [Measure_2],
    3, [Measure_3]
    )

     

    Now use this measure in your visualizations and the Table you created previously has your legend or column in the visualizations.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      hi MFelix,

      let me give it a try & revert accordingly later.

      tks, -nik

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

     

    Best Regards,

    Rico Zhou