Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
So I have this DAX code that gives me the top product based on sales and that can be filtered on.
Top product =
VAR temp_table =
SUMMARIZE (
ALL ( sales_corona[Product] );
sales_corona[Product];
"SalesTotalValue"; SUM ( sales_corona[Sales] )
)
RETURN
CALCULATE (
MAX ( sales_corona[Product] );
FILTER (
ADDCOLUMNS ( temp_table; "Rank"; RANKX ( temp_table; [SalesTotalValue] ) );
[Rank] = 1
)
)
It works absolutely perfect. When I filter I get different results for different cities for example. However when I filter on the product itself. It remains the same. So let's say product X is my top product. Now I apply a filter that leaves product X out (I would assume that product X can't be my top product anymore), however it still is.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 17 | |
| 11 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 14 | |
| 12 |