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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rennda
Frequent Visitor

Ranking with FIlters in a Matrix Table

Hi there. I´m a rookie in DAX and Power Bi, so I would be happy if you can help me with my actual issue.  

 

I build a Matrix table which shows me the Ranking of MTBF by Name. I have tested two different measures (Rank MTBF 1 and RANK MTBF2).

 

Ranking tableNOFILTER.JPG

When I drill down the Matrix I can see the "Device Classes" of the single employees with the Ticketcount and the MTBF

 

RankingMatrixNOFILTER.JPG

 

Now there is my issue. I have to set a filter on the ticketcount. I only wanna show and rank Device Classes with a Ticketcount >= 10.

 

If i set the ticketcount filter in the Filter Context from my Visual i´m getting the following result:

 

Ranking table.JPGRankingMatrix.JPG

 

Here is the code i use actually for my ranking:

 

Rank MTBF 1 = RANKX(ALL(Ticket_Kennzahlen_table[Name]); CALCULATE([MTBF Performance]))
RANK MTBF 2 = RANKX(ALL(Ticket_Kennzahlen_table[Name]) ;CALCULATE(Ticket_Kennzahlen_table[MTBF Performance]; ALLEXCEPT(Ticket_Kennzahlen_table; Ticket_Kennzahlen_table[Name]);Ticket_Kennzahlen_table[ticket_gruppe] = 5||6;Ticket_Kennzahlen_table[Name (Gruppen)] = "varV");;DESC)

* In RANK MTBF 2 i set additional Filters on a Group of Names and the Ticketgroup. I don´t know if i really need this.

 

 

Thank you very much for your help

 

 

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @rennda ,

 

You may create the rank measure like DAX below.

 

Rank MTBF= RANKX(FILTER(ALLSELECTED(Ticket_Kennzahlen_table), Ticket_Kennzahlen_table[Name]=MAX(Ticket_Kennzahlen_table[Name])&&Ticket_Kennzahlen_table[Ticketcount] >10), MAX([MTBF Performance]),,DESC)

Could you please clarify the logical differences between the Rank MTBF 1 and Rank MTBF 2.

 

I am not sure what desired result would you want, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.