Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have two tables related to each other by ID. One table has information about dates when a equipment failed and how it did and the other table contains information about all equipments (id,category, room, building) just like this:
| Eq ID | Month year | Failure Mode |
| 001 | 2-2024 | - |
| 002 | 3-2024 | - |
002 | 6-2024 | - |
| 004 | 8-2024 | - |
| 003 | 2-2024 | - |
| Eq ID | Cathegory | Room | Building |
| 001 | Electrical | 10 | A |
| 002 | Electrical | 11 | A |
| 003 | Mechanical | 10 | A |
| 004 | Mechanical | 12 | B |
I already created a metric that counts how many times an equipment appears in table Failures:
| Eq ID | Cathegory | Room | Total Failures | Rank per Cathegory | Rank per Room |
| 001 | Electrical | 10 | 1 | 2 | 1 |
| 002 | Electrical | 11 | 2 | 1 | 1 |
| 003 | Mechanical | 10 | 1 | 1 | 1 |
| 004 | Mechanical | 12 | 1 | 1 | 1 |
NOTE: I would like to keep using the metric Count_failures because it can changes over time instead of a calculated column in the table Equipments wich will have an static value.
Hi @SpanishEnjoyer -Create a new measure that ranks the equipment based on the number of failures within its respective category
Rank_Per_Category =
RANKX(
ALLSELECTED('Table Equipments'[ID Eq]),
[Count_Failures],
,
DESC,
DENSE
)
create another measure for rank for each room as below:
Rank_Per_Room =
RANKX(
ALLSELECTED('Table Equipments'[ID Eq]),
[Count_Failures],
,
DESC,
DENSE
)
this way you can achieve, hope it works.
Proud to be a Super User! | |
Thanks for your answer, but the new metrics works as the metric Ranking that is already created. It doesn´t rank the equipment by cathegory or room.
Hi @SpanishEnjoyer ,
I don't quite understand your grouping logic, if the room ordering 001 and 003 should be the same, they should both return 2.
Please detail your needs and demonstrate the expected results.
Best regards,
Community Support Team_ Scott Chang
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 68 | |
| 50 | |
| 46 |