Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
My source data has a table with users and each sale they make is recorded as a row.
My goal is to find the latest date each user made a sale then rank those dates accordingly with the latest being 1.
Table Example
The formula I'm using to find the max date is working correctly
Solved! Go to Solution.
Thanks for the help guys, funny enough when I was creating a mock data set I happened to use ALLEXCEPT in the MAX DATE formula, then ALLSELECTED in the last date measure started to work...
Hi @vendersonalias0 ,
You can create a measure as below:
Last Sale =
RANKX (
ALLSELECTED ( 'salestable' ),
CALCULATE ( MAX ( 'salestable'[Date] ) ),
,
DESC,
DENSE
)
Best Regards
@vendersonalias0 makes sense, I guess you used ALLEXCEPT ( Table, Table[User]), correct?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks for the help guys, funny enough when I was creating a mock data set I happened to use ALLEXCEPT in the MAX DATE formula, then ALLSELECTED in the last date measure started to work...
@vendersonalias0 there are many ways to achieve this. I would recommend putting sample data in pbix and share thru one drive/google drive and will get you the solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@vendersonalias0 , frankly speaking, the complexity of RANKX() is way beyond one's expectation, especially when you include another measure in it; context transition occur twice during the evaluation of RANKX.
Unless you paste some dummy data or a pbix file, it's hard to author a correct measure that fits in your scenario.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |