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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lucasuzeda
New Member

Rankx returning duplicates for different amounts

Hello,

 

I am trying to get the rankings for the amount of hours. I proceeded with the expressions: 

- Downtime = sum(Sheet1[Duration (hours)])

 

- Ranking Downtime Alarm = 

    if( 

        hasonevalue(Sheet1[Alarm Code Final]),

    rankx(

        ALLSELECTED(Sheet1[Alarm Code Final]),

        [Downtime],,DESC,Dense)

    )

 

However, I am getting odd results:

For the case below: Rank 5 does not appear, then 7 comes 2 times. There's no 9, 10 appears two times. There's no 14 and 15 appears two times. These duplicate rankings are not tied, they're different amount of the sum. And this goes on along the measure.

lucasuzeda_1-1619200145484.png

 

Could I get any support on this one?

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @lucasuzeda ,

 

Check the dax you wrote. For the above errors, it may be caused by the structure of the table model. Downtime = sum(Sheet1[Duration (hours)]). What does the field in the formula refer to? Can you provide a complete data model (delete sensitive information). I will answer for you as soon as possible.


Looking forward to your reply.

 

Best Regards,
Henry

 

 

Jihwan_Kim
Super User
Super User

Hi, @lucasuzeda 

I am not sure about how your whole data model looks like, but please check whether the [Alarm Code Final] is filtered by category or sub category.

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: https://www.linkedin.com/in/jihwankim1975/


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.