Forum Discussion
Display top 3 filter - seeking advice.
- 8 years ago
If so, you can do this just using the filter options. I have attached a PBIX file
Hi steambucky,
Based on the example that you have given I have derived my below suggestion. Hope this suits your need!!
As you need to display only the TOP 3 Animals, there is no doubt that you need some column based on which you will define the TOP 3. For this purpose I am considering a pet shop data and that I have an additional no column for each of the animals. In my case it is the "no. sold"column of the below example
Dimension
Data Table
I join these two table based on ID.
Now when I drag the columns Name and Nos. Sold to a table, I will get the sold quantity split by animal
Here is where my Rank Measure comes into picture. It is as follows
Rank Animals = RANKX(ALL(Animal),SUMX(RELATEDTABLE('Animal Sales'), 'Animal Sales'[Nos]),,DESC,Dense)The Above measure gives me the Rank of animals by Quantity Sold and my table will look like the one below
Animal Table showing Ranks as the last column
Now to show only the TOP 3 Animals, add the measure as a filter to the table and remove the other unwanted columns as shown below
Top 3 Filtered
Best Regards