The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello. I need help to solve this problem when creating a measure with Rankx.
I want to create a ranking in ascending order that when filtering by "Liga", the ranking appears like this:
But when I write in the measure: ASC, so that it is sorted in ascending order with the filter "Liga", that order in the ranking does not occur as in the previous image:
I need this measure that I have created, when filtering it in "Liga" by "1ª Federación", "Argentina" or "Segunda División" to appear like this, sorting in ascending order according to the data in the "Min/Centro al área" column.
How can I make it appear in ascending order ordered from 1,2,3,4,5,6,7... and not appear 1 and then position 1565?
Thanx!!
Solved! Go to Solution.
Hi @paulmacky ,
Create a separate measure of the values you use for sorting, and then use the measure of the values in the sorted measure, using allselected(table) in the sorted measure, without the column:
Refer the below sample ,I created:
output result:
You could download my pbix file to learn more details .
Best Regards
Lucien
Hi @paulmacky ,
You need use allselected in your dax:
RANKX(ALLSELECTED('Table'[Column]),[Measure],,ASC,Dense)
Similar question refer:
https://community.powerbi.com/t5/Desktop/Dynamic-rank-with-slicer/m-p/566920
Best Regards
Lucien
Thnx for your answer @v-luwang-msft
I already use allselection and it doesn't work for me:
if I put dense as @amitchandak has told me, it is close to what I need:
But I need it to be this way, as I indicate in red:
thnx!
Hi @paulmacky ,
Create a separate measure of the values you use for sorting, and then use the measure of the values in the sorted measure, using allselected(table) in the sorted measure, without the column:
Refer the below sample ,I created:
output result:
You could download my pbix file to learn more details .
Best Regards
Lucien
@paulmacky , Add dense as the last option in rank and try
RANKX(all('Table'[Column]),[Measure],,ASC,Dense)
Thnx for your answer @amitchandak!
I added dense and it ordered me, but in this way:
Is there a way to make the order look like this?