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 am making a simple product category ranking by product category.
When I use rankx function without slicer, ranking is as follows:
When I apply slicer filter f.e. on Packaged Chocalate, the ranking changes from 9 to 10:
Some rank positions after applying filter remain the same, some not.
The ranking function looks as follows:
Solved! Go to Solution.
Nothing but (inevitable) floating-point inaccuracy ever since the creation of modern computer (binary notation)
The solution is very straightforward,
Total Sales =
INT(
SUMX(
'Sales by Store',
'Sales by Store'[quantity_sold] * 'Sales by Store'[unit_price]
)
)
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Nothing but (inevitable) floating-point inaccuracy ever since the creation of modern computer (binary notation)
The solution is very straightforward,
Total Sales =
INT(
SUMX(
'Sales by Store',
'Sales by Store'[quantity_sold] * 'Sales by Store'[unit_price]
)
)
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Hi @gumis_rulez
Have you tried changing ALL to ALLSELECTED?
Rank Test =
IF(
HASONEVALUE( 'Product Lookup (Updated)'[product_category] ),
RANKX(
ALLSELECTED( 'Product Lookup (Updated)'[product_category] ),
[Total Sales]
),
BLANK()
)
Let me know if you have any questions.
When using ALLSELECTED if you select only one category, this category will have rank 1.
The goal is when you have selected packaged chocolate the rank should be calculated based on total sales of all categories and have 9 in this example.
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 |