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.
Forgive me 😊Im a little new to DAX ---
Below I show my table PBI_ae272LeadsReport
How do I create a MEASURE that will rank the CLIENT # column in descending order ....based on values in the 'LFT_Purchase' column?
Ive tried writing the DAX but Im doing something wrong ---need your help please
LeadsReportTable Oct 15 2020
Solved! Go to Solution.
Hi, @Anonymous
You don’t have to use a measure to rank the value of [LFT Purchase], you can just do it in power query editor, you can follow my steps:
If you still want to achieve this in DAX, you can try this calculated column:
Rank = RANKX(PBI,MAX('PBI'[LFT Purchase]),,DESC)
If you this way is not suitable for your requirement, you can reply to me and post some sample data(without sensitive data) and your expected result.
Here are some good blog that tell how to sort columns using dax, you can follow these links to learn more about sorting in power bi:
https://www.wiseowl.co.uk/blog/s2469/rankx-function.htm
https://powerbi.tips/2019/09/custom-sort-order-within-a-dax-measure/
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
You don’t have to use a measure to rank the value of [LFT Purchase], you can just do it in power query editor, you can follow my steps:
If you still want to achieve this in DAX, you can try this calculated column:
Rank = RANKX(PBI,MAX('PBI'[LFT Purchase]),,DESC)
If you this way is not suitable for your requirement, you can reply to me and post some sample data(without sensitive data) and your expected result.
Here are some good blog that tell how to sort columns using dax, you can follow these links to learn more about sorting in power bi:
https://www.wiseowl.co.uk/blog/s2469/rankx-function.htm
https://powerbi.tips/2019/09/custom-sort-order-within-a-dax-measure/
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , You can have column/static rank
rankx(All(Table[client#]), [LFT_Purchase],,desc, dense)
measure rank
rankx(All(Table[client#]), calculate(sum(Table[LFT_Purchase])),,desc, dense)
or
rankx(Allselected(Table[client#]), calculate(sum(Table[LFT_Purchase])),,desc, dense)
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
79 | |
63 | |
52 | |
47 |
User | Count |
---|---|
219 | |
89 | |
76 | |
67 | |
60 |