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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Sea_and_Anne
Helper I
Helper I

Rank Display only top 10 and add a filter to rank formula

Hello,

I have one table with the Machine name and the number of Alarms. I want to create a simple graph with the top 10 of the machines with the hightest number of alarms, but witha  condiction they should be lower than 14.
So, i have created the column rankAlarm and then i have filtered my graph with this column <10. However i have so many records with the same number of alarms..i.e in the same rank level...do you know how can i only display only 10 machines? And do you know how can i do this rank with the filter Alarms < 14?


Thank you in advance for your help

 

 

powerbi.png

🙂

 

 

5 REPLIES 5
v-yulgu-msft
Microsoft Employee
Microsoft Employee

@Sea_and_Anne

Hi Sea_and_Anne,

 

You can create a new table which contains only the first 10 rows and each Alarm value is less than 14.

NewTable = TOPN(10,FILTER('Table','Table'[Alarm]<14),Table[Alarm],DESC)

 

Thanks,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello Yuliana_GU,
Thanks for your help!
I have other doubt, if I have more than one register per machine, as the follow case, where i have Machine A with 4 registers. How can I write the TOPN function in order to appear machine A only one time and not fill the first 4 levels of the top 10.

 

NewTable = TOPN(10,'Table','Table'[Alarm],DESC)

 

 

MachineAlarmsNature
A14a
A14s
A14f
A14g
B13a
B13g
D12r
E11t
F10h
G6w
H5q
I5a
J4g
K3h
L2t
Greg_Deckler
Community Champion
Community Champion

Seems like you need an additional piece of information. Perhaps adding an ID to your Machine table, 1, 2, 3, 4, 5 and then adding this number to your Rank would get you where you need to be.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I thought about this, how can i add the ID on power Bi?

Hi There,

 

To add a ID Column, Go to the Query Stage, Under Add Column Tab, Select Add Index Column and You are done.

 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors