cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
olimilo Member
Member

Problem with getting the Top 5 entries

I've been trying to follow the examples on the forums, but I'm getting the incorrect output when trying to get the Top 5 Entries in my column.

 

Given the following data:

 

something.png

 

I would like to get the top 5 results from the table. I tried the following formulas:

 

[Measure] Violation Ranking = RANKX(ALL(Violation_Data), COUNTA(Violation_Data[Violation]))

[Column] Top Violations = IF([Violation Ranking] > 5, "Others", Violation_Data[Violation])

 

But I'm still getting all of the results from [Violation] (I think it has something to do with the Calculated Column). I tried using a Visual Filter instead (show only [Violation Ranking] <= 5), but I'm still getting the same results (the [Violation Ranking] of each [Violation] is 1 (which is odd, to say the least) that's why all of the violations are displayed.

 

Anyone know how to correct the given DAX code?

1 ACCEPTED SOLUTION

Accepted Solutions
olimilo Member
Member

Re: Problem with getting the Top 5 entries

Okay, so I think I got it. I was able to use Visual Filters to select just the top 5 most recurrent Violations in the table like so:

 

BhdsW

View solution in original post

1 REPLY 1
olimilo Member
Member

Re: Problem with getting the Top 5 entries

Okay, so I think I got it. I was able to use Visual Filters to select just the top 5 most recurrent Violations in the table like so:

 

BhdsW

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)