March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Good afternoon,
Please, I would appreatiate some help. I have the following:
I would like to get the proper rank for the parameter based on LAP and DRIVER considering the segmentation. I tried with the following measures but none of them are working:
Option 1) RANK = RANKX(ALLSELECTED(Data[LAP];Data[DRIVER]);[PARAMETER];;DESC;Dense)
Option 2) RANK = RANKX(ALLEXCEPT(Data;Data[LAP];Data[DRIVER]);[PARAMETER];;DESC;Dense)
With this ranking, I want to get the top1 PARAMETER value (maximum) and top2 PARAMETER value (second maximum) for each DRIVER.
Thank you very much for your help.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
parameter measure: =
SUM( data[parameter] )
RANK function (DAX) - DAX | Microsoft Learn
parameter rank: =
RANK (
DENSE,
ALL ( data[lap], data[driver] ),
ORDERBY ( [parameter measure:], DESC ),
,
PARTITIONBY ( data[driver] )
)
top 2 by driver: =
IF ( [parameter rank:] <= 2, [parameter measure:] )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello, Thank you Jihwan_Kim for your answer.
I tried with the ranking you told me, but I still has problems. I have complete the phbix file you did to show you my problem.
I am trying to attached the phbix that I completed, but I can't.
I think, there is a problem on the code because it has to take into account the segmentation of the year (2022,2023), track (test, test 1,..) and session (example:R1,R2,..).
Thank you
Hi,
please share the link of your sample pbix file (onedrive link, dropbox link, or others), and then I can try to look into it.
Thank you.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello, I am not sure if it can be openend by you in here:
I share it with you by email as well.
Thank you
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |