The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
My goal is to Rank Total Turnover By Customer By Week.
I have this as a calculated column:-
=RANKX(ALL(ASC_TBI_TBL[Customer]),CALCULATE([Total Turnover 2023],ALLEXCEPT(ASC_TBI_TBL,ASC_TBI_TBL[Customer])),,DESC)
My calculated column doesn't work quite as expected. If you select single week number (say week number 1) it doesnt give ranking results 1,2,3 etc.
It does work ok if all weeks are selected. Somehow I need to add a filter on week to see result for individual week.
In Table, ASC_TBI_TBL, I do have column named Week. Week contains numbers 1 to 52.
How can I add FILTER to my calculated column to give the desired output?
Thanks in advance,
Pablos
Pablos
Solved! Go to Solution.
Solution Found.
First, I needed to create a 'unique' column I could rank on.
I created a column named Customer_Product that was the Customer and Product columns joined together.
Next, created a measure named Rank Turnover By Customer By Product.
DAX
=IF(HASONEVALUE(ASC_TBI_TBL[Week Number]),RANKX(ALL(ASC_TBI_TBL[Customer_Product]),[Total Turnover 2023],,DESC,Dense),BLANK())
Hope this helps others 🙂
Solution Found.
First, I needed to create a 'unique' column I could rank on.
I created a column named Customer_Product that was the Customer and Product columns joined together.
Next, created a measure named Rank Turnover By Customer By Product.
DAX
=IF(HASONEVALUE(ASC_TBI_TBL[Week Number]),RANKX(ALL(ASC_TBI_TBL[Customer_Product]),[Total Turnover 2023],,DESC,Dense),BLANK())
Hope this helps others 🙂
Padycosmos - thank you for reading my post and taking the time to reply. I will check out the videos.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
82 | |
76 | |
46 | |
39 |
User | Count |
---|---|
135 | |
109 | |
70 | |
64 | |
55 |