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
Go to Solution.
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:
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.
View solution in original post
@Anonymous , You can have column/static rank
rankx(All(Table[client#]), [LFT_Purchase],,desc, dense)
rankx(All(Table[client#]), calculate(sum(Table[LFT_Purchase])),,desc, dense)
rankx(Allselected(Table[client#]), calculate(sum(Table[LFT_Purchase])),,desc, dense)
For Rank Refer these linkshttps://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measureshttps://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columnshttps://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finalehttps://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.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.