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
Hydrarian
Helper I
Helper I

Order a visual table by multiple measures

Hi all,

I've created a table visual in which I want to display the invoice net amount for every customer under a sales force agent. I've created some measures in order to display the net amount over the years and also months of the current year. What I would like to do is to order this records by multiple column measures. Here is an image to better understand: Iwould like to order this list first by "Agente", then by "2014" and then "2015" and so on... While "Agente" is a physical column, the other ones are measures.

 

pbi.PNG

 

I tried to search to the web but I've found only how to order them by physical columns. In this case I've only measures, so what I ask is: is there a way to do it even if they're not physical column in a table? Thanks

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Hydrarian ,

 

We can create a measure and put it into table visual to meet your requirement:

 

rank = 
RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent]),[Agent],SELECTEDVALUE('Table'[Agent]),ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/1
+RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent],"2014c",[2014]),[2014c],[2014],ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/10
+RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent],"2015c",[2015]),[2015c],[2014],ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/100
+RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent],"2015c",[2015]),[2015c],[2014],ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/100

 

9.jpg

 


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Hydrarian ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi and thanks for your support. What I want to do is these things all together:

1) Order by the first column (Agente) in alphabetical order

2) Order by the third column (2014) in Descending order

3) Order by the fourth column (2015) in Descending order

4) Order by the fifth column (2016) in Descending order

...and so on until 2019.

The purpose is to show the highest values first and then the other values in descending order for every Agente. I hope I've explained it in a more understandable way.

v-lid-msft
Community Support
Community Support

Hi @Hydrarian ,

 

We can create a measure and put it into table visual to meet your requirement:

 

rank = 
RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent]),[Agent],SELECTEDVALUE('Table'[Agent]),ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/1
+RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent],"2014c",[2014]),[2014c],[2014],ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/10
+RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent],"2015c",[2015]),[2015c],[2014],ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/100
+RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Agent],"2015c",[2015]),[2015c],[2014],ASC,Dense)/DISTINCTCOUNT('Table'[Cliente])/100

 

9.jpg

 


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors
Top Kudoed Authors