Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
We need to return a table where we can look at all products for 2018 and 2019 and to be able to filter on the ranking of the customer's total spend in 2018 on all products (ranked against spend for other customers in 2018). How would we use Rankx and Summarize to do this. Any other suggestions?
Solved! Go to Solution.
If I understand your requirements correctly I think the following will work. It calculates the ranking for a product across all customers based on the 2018 sales.
Measure = RANKX(CALCULATETABLE('Table', ALL('Table'[Customer]), 'Table'[YearOfSale] = 2018), calculate(SUM('Table'[Total Spend by Year])))
If this is not what you are after can you post your expected results based on the dataset above?
Try
Year Rank= RANKX(all('Table'[year Of sales]),[Total Spend By Year],,DESC,Dense)
Also refer : https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
If I understand your requirements correctly I think the following will work. It calculates the ranking for a product across all customers based on the 2018 sales.
Measure = RANKX(CALCULATETABLE('Table', ALL('Table'[Customer]), 'Table'[YearOfSale] = 2018), calculate(SUM('Table'[Total Spend by Year])))
If this is not what you are after can you post your expected results based on the dataset above?
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |