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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

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 @Anonymous ,

 

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 @Anonymous ,

 

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.
Anonymous
Not applicable

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 @Anonymous ,

 

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.