cancel
Showing results for 
Search instead for 
Did you mean: 

Top N Count Returning 1 Extra

For some reason some of our Top N count analyses are returning an extra count.  For example, in the screen shot shown, we're wanting to see the top 20 manufacturers, but 21 are being returned in the matrix.

 

Screen Shot 2021-06-14 at 10.45.36 AM.png

Status: New
Comments
v-lili6-msft
Community Support

hi

I have tested on my side, it works well.

and for your case, the problem should be this: for rank 20, there are two manufacturers, so they will show together.

 

for example:

Let me show you a simple example.

 

I create a measre below:

Measure = COUNT('Table'[Equipment])

9.JPG

 

manufacturer D and E has the same COUNT('Table'[Equipment]), they all in rank 4.

then I set Top 4 for this visual level filter, the visual will show 5 rows data.

 

in your case, you could also create a measure as above and then drag it to this visual, you will see that there are two manufacturers in rank 20, so they will "return an extra count".

 

 

Regards,

Lin

andrew5083
Frequent Visitor

@v-lili6-msft, that is exactly what is happening for us.  Our current BI solution takes sort into account for top N lists.

 

Ex. if there is a sort on manufacturer (A-Z) and we add a top N list to the report, only 20 results will be displayed, and if 2 manufacturers have the same count at the bottom of the list, only the manufacturer that appears first alphabetically is displayed.

 

I prefer how Power BI is behaving, but our executive team want top N list to display a true top N.  Do you know of any work arounds for this?

v-lili6-msft
Community Support

hi

if so, try this workaround:

Create a rank measure as below then drag this measure into visual level filter and set is <=20.

https://community.powerbi.com/t5/Community-Blog/Power-BI-Handling-Duplicate-Rankings-Using-the-RANKX...

 

 

Regards,

Lin

andrew5083
Frequent Visitor

@v-lili6-msft thank you!  I think this will work for them.