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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mansi
Microsoft Employee
Microsoft Employee

How can I sort the data in a table or matrix by one text/dimension and one calculated measure

Hi

 

I have a report which contains multiple text columns and measures. I am looking for the ability to sort the data in a table or matrix by one text/dimension and one calculated measure. So, the first column needs to be sorted in Ascending order and all the other subsequent columns should be sorted based on the Calculated Measure (which is the part of the report).

 

I am able to sort data by either that text column or calculated measure, but not able to sort by both at the same time. Any ideas on how this can be done?

 

Appreciate your help!

 

Thanks

Mansi

1 ACCEPTED SOLUTION
mansi
Microsoft Employee
Microsoft Employee

This can be achieved by adding a measure Clicks/Total Clicks and then sort descending by that.

View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

@mansi can you give more detail or the logic that would trigger them to be sorted

 

 

what is the business requirement here?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




mansi
Microsoft Employee
Microsoft Employee

Hi @vanessafvg

 

The goal is to find out which link was most clicked within each email in the latest month. We have a bunch of emails in the same report.

 

To simplify the ask, I want to build a report (table/matrix) with Email Name, Link Name and Number of Clicks in the current month.

  • Email Name should be sorted in Ascending Order. This is because some of these are nurture emailsand are sent out in a particular order.
  • Link Name should appear in the descending order of Clicks. This is to ensure that for each Email, the link that is clicked most should appear on the top and then the 2nd most clicked link, and so on..
  • The measure - Click is calculated for rolling 30 days.

 

Current issue is that if I just sort the table by descending clicks, it also sorts the Email Name and shows the one with most clicked on the top.  In the snapshot below, the Link Names are sorted in the appropriate order (descending), but the order of Email Name also changed. I want the Email1 to appear first.

 

Power BI.PNG

 

Please let me know if you need further details.

mansi
Microsoft Employee
Microsoft Employee

This can be achieved by adding a measure Clicks/Total Clicks and then sort descending by that.

could you please elaborate on this one ? I seem to have a similar request but I didnt quite understand how you solved it and how it looks in the end ?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.