Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello guys,
Please I need your help for my dax formula.
I have a dataset composed of 10 categories and different products for each of these categories ( products in one category can't be found in another category )
I want to measure the products that costed the least to produce each year. I have created this measure to compute the evolution YoY:
YoY% = divide ( sum(cost_current_year) - sum(cost_last_year),sum(cost_last_year))) and formatted it to %.
Then I created this measure to rank them : rank = rankx(ALLSELECTED(Table[Products]),[YoY(%)],,ASC)
My problem : I want to only show the TOP 1 ( best evolution ) product for each of the categories. So I filter by my measure rank ( rank=1 )
But in my matrix or table, it displays sometimes one product sometimes two or three that are ranked 1 for the same category although i filtered with rank=1 and they have different YoY% values ? where is my mistake i just can't find it .. I only want to show one product for each category.
Note that I have only one dataset and it's not a problem of relations.
Thanks for trying to understand my problem
@Anonymous RANKX by default returns duplicate rankings if the expression is the same. There's no real way around it other than perhaps adding very small random numbers to your expression to ensure that they are each unique.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |