March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Community -
I have a set of data with part_numbers, quantities and dates. I am looking to be able to rank the dates from newest to oldest so that I can determine if the part is one that we are actively purchasing based on the most recent 3 weeks (sometimes the part is not purchased on the date and there is no line of data for the part for the specific date).
I have my RANKX formula ranking the dates
What I need to happen, when I change the range in the example above, I would need 2/1/2021 to have a RANK of 1 1/25/2021 to have a RANK of 2 and so on.
I am guessing this is a simple miss by me, but any help would be great.
Thanks
Ryan
Solved! Go to Solution.
I've set up a small example with a simple table that only has about 10 dates, then created this measure:
Ranking =
if( ISINSCOPE( Releases[Release Date] ),
RANKX(
ALLSELECTED( Releases[Release Date] ),
CALCULATE( SELECTEDVALUE( Releases[Release Date] ) ),,
DESC
)
)
and it works as expected, adjusting itself to the selected range.
I've set up a small example with a simple table that only has about 10 dates, then created this measure:
Ranking =
if( ISINSCOPE( Releases[Release Date] ),
RANKX(
ALLSELECTED( Releases[Release Date] ),
CALCULATE( SELECTEDVALUE( Releases[Release Date] ) ),,
DESC
)
)
and it works as expected, adjusting itself to the selected range.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |