Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 3
v-rzhou-msft
Community Support
Community Support

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

MFelix
Super User
Super User

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.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

hi @MFelix,

let me give it a try & revert accordingly later.

tks, -nik

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.