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.
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.
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
Solved! Go to Solution.
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
If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.
Best regards,
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,
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.
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
If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.
Best regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.