Forum Discussion

greenawayr's avatar
greenawayr
Icon for Helper I rankHelper I
6 years ago
Solved

Table showing Top 5

Hi,

I'm sure this is probably a lot easier than I'm thinking it is but I need to create a table showing a Top 5 items based on column 1.

 

However, because column 1 is likely to contain a lot of the same values I need to use a second column to determine the actual Top 5.

 

IDDepartmentColumn 1Column 2
1a2510000
2a2540000
3a2530000
4b2525000
5b255000
6c250
7c25100000
8c20100000
9d2075000

 

To add to this there is a slicer for department, so when a department is selected it shows the Top 5 for that department, and if no dpeartment is selected, it shows the Top5 for the whole business.

 

IDDepartmentColumn 1Column 2
1c25100000
2a2540000
3a2530000
4b2525000
5a2510000

 

This is what I would expect my Top 5 table to look like

 

Using TopN filter on the table filter doesn't seem to work as I can only use TopN once on the visual. So when viewing all items, I can set the ID to TopN = 5 and use the Column 1 as the "By Value" field, however as I have more than 5 items with the value 25 in Column 1  I am not seeing the true Top 5. i.e. the top 5 values in Column 1 by Column 2. 

 

Any help is greatly appreciated.

4 Replies