Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!