The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have the following sample Dataset and I need to be able to rank the SKU based on the $ Amount for a specific time period and product combination. The user wants to see ranks for multiple time periods but these need to change based on Product selection as a slicer. Below is the data. Any help would be appreciated
Time Period | Products | SKU | $ Amount |
Last 4 Weeks | A | AA | 1 |
Last 4 Weeks | A | AB | 3 |
Last 4 Weeks | A | AC | 0.5 |
Last 4 Weeks | B | BA | 2 |
Last 4 Weeks | B | BB | 1 |
Last 4 Weeks | B | BC | 6 |
Last 16 Weeks | A | AA | 3 |
Last 16 Weeks | A | AB | 4 |
Last 16 Weeks | A | AC | 1 |
Last 16 Weeks | B | BA | 4 |
Last 16 Weeks | B | BB | 6 |
Last 16 Weeks | B | BC | 7 |
Solved! Go to Solution.
Rank = RANKX ( ALLSELECTED ( TableName ), CALCULATE ( SUM ( TableName[$ Amount] ) ), , DESC, DENSE )
hi, @rampsaladi
rankn = RANKX(ALL(tabela[Time Period];tabela[Products];tabela[SKU]);[TT_Amount];;ASC;Dense)
Rank = RANKX ( ALLSELECTED ( TableName ), CALCULATE ( SUM ( TableName[$ Amount] ) ), , DESC, DENSE )
Thank you this helps
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |