Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I want to find Top 10 products. I want to check month wise sales of those top 10 product.
Top 10 products should be calculated dynamically I have to apply multiple filters on this(ex: location, category)
My ask is build the TopN visual level filter manually with help of DAX measures.
sample data
ProductsMonth YearSalesLocationCategory
| A | 1/1/2023 | 20 | India | Clothing |
| B | 1/1/2023 | 25 | US | Transport |
| C | 1/1/2023 | 20 | China | Costume |
| D | 1/1/2023 | 23 | UK | Household |
| E | 1/1/2023 | 24 | Germany | Laptop |
| A | 2/1/2023 | 10 | US | Clothing |
| B | 2/1/2023 | 12 | India | Transport |
| C | 2/1/2023 | 11 | Germany | Costume |
| D | 2/1/2023 | 30 | China | Household |
| E | 2/1/2023 | 50 | Germany | Laptop |
| A | 3/1/2023 | 40 | China | Clothing |
| B | 3/1/2023 | 50 | Germany | Transport |
| C | 3/1/2023 | 40 | India | Costume |
| D | 3/1/2023 | 30 | US | Household |
| E | 3/1/2023 | 10 | Germany | Laptop |
| A | 4/1/2023 | 10 | Germany | Clothing |
| B | 4/1/2023 | 20 | US | Transport |
| C | 4/1/2023 | 10 | US | Costume |
| D | 4/1/2023 | 30 | China | Household |
| E | 4/1/2023 | 40 | India | Laptop |
expected output :
I am confused by your expected result.
It shows a matrix, listing Products B, C & E, which applies to all Month Year combinations.
This cannot be - because each month, the Top N Products will be different.
For example, if there are no slicer values selected, then the Top 3 for each month+year will be as follows.
- Jan 2023 = B, E, D
- Feb 2023 = E, D, B
- Mar 2023 = B, A, C
- Apr 2023 = E, D, B
In my XLS analysis screenshot below, color coding is arbitrary:
- Blue = #1 highest value in given month
- Orange = #2...
- Green = #3...
- Yellow = highlights how the Top 3 Products cannot be the same for all months, as the Top 3 Products are constantly changing for each month.
Would it be possible to provide a new Excel file screenshot of your desired results, when no slicer values are selected? I'm not yet understanding what you want to see.
NOTE 1: When using TOPN in a given measure, the entity for which you are calculating is typically NOT shown in the visual. For example, because we are doing TOPN "Products" in the measure, "Products" would typically NOT be shown in the visual. Instead you would display something like the Sales for TOPN products across other entities, such as time, location, category etc.
NOTE 2: If you are desiring to display the entity (e.g. "Product") in the visual and wanting to get the TOPN for that entity (e.g. "Product"), then typically you would use the GUI TOPN functionality in the visual Filters in PBI. (Even in this case, you could not have the same set of Products be the same Top 3 across all months.)
Regards,
Nathan
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |