- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Multiple Top N
Hi,
I have 2 tables.
Table1
Category | Product |
Fruits | Apple |
Fruits | Banana |
Fruits | Kiwi |
Fruits | Mango |
Vegetables | Celery |
Vegetables | Lettuce |
Vegetables | Carrot |
Vegetables | Onion |
Grains | Rice |
Grains | Bread |
Grains | Pasta |
Grains | Beans |
Meats | Chicken |
Meats | Beef |
Meats | Turkey |
Table 2
Date | Product | Sale |
2/5/2024 | Banana | 4 |
2/5/2024 | Lettuce | 19 |
2/5/2024 | Onion | 14 |
2/5/2024 | Beans | 5 |
4/10/2024 | Lettuce | 13 |
4/10/2024 | Carrot | 12 |
4/10/2024 | Onion | 18 |
4/10/2024 | Mango | 14 |
4/10/2024 | Chicken | 20 |
4/10/2024 | Beef | 20 |
4/10/2024 | Beans | 15 |
5/1/2024 | Beans | 19 |
5/1/2024 | Rice | 18 |
5/1/2024 | Onion | 12 |
5/1/2024 | Lettuce | 7 |
5/1/2024 | Celery | 17 |
5/1/2024 | Carrot | 18 |
5/1/2024 | Banana | 10 |
I am trying to get a visual that shows top 2 categories for the latest date selected via a date slicer. Example if no date is selected in slicer would default to 5/1/2024 (latest date).
Category | Sale |
Vegetables | 54 |
Grains | 37 |
How do I achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hy @buttercream ,
Assuming that you have a DateDimension that is linked to the sales date and assuming that you are linking the two examples based on the Product field; then the Top N will get you want you want. By doing this version you get it by date:
If you want to ignore the date, change the top N by Sale instead of Date
If you want to have this done by a specific date, you could use either method and then make a Dax date of "latest date" and then put that into the filter for the visual.
Did I answer your question? Mark my post as a solution!
Proud to be a Datanaut!
Private message me for consulting or training needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hy @buttercream ,
Assuming that you have a DateDimension that is linked to the sales date and assuming that you are linking the two examples based on the Product field; then the Top N will get you want you want. By doing this version you get it by date:
If you want to ignore the date, change the top N by Sale instead of Date
If you want to have this done by a specific date, you could use either method and then make a Dax date of "latest date" and then put that into the filter for the visual.
Did I answer your question? Mark my post as a solution!
Proud to be a Datanaut!
Private message me for consulting or training needs.

Helpful resources
User | Count |
---|---|
97 | |
90 | |
85 | |
56 | |
51 |