Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.LeanAndPractise(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.LeanAndPractise(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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |