Forum Discussion
AvPowerBI
Post Patron
4 years agoRank Dates
Hi, I want to do a Rank function which is based on the columns TableName, Group and DateTime So for the latest DateTime for each TableName that is in the Group I want that to be ranked as 1 e.g...
- 4 years ago
Hi AvPowerBI ,
Here a solution:
And here the DAX:
TomsRankColumn = RANKX ( FILTER ( 'Table', 'Table'[TableName] = EARLIER ( 'Table'[TableName] ) && 'Table'[Group] = EARLIER ( 'Table'[Group] ) ), 'Table'[DateTime], , DESC , DENSE )Let me know if this works for you 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
tackytechtom
Most Valuable Professional
4 years agoHi AvPowerBI ,
Here a solution:
And here the DAX:
TomsRankColumn =
RANKX (
FILTER (
'Table',
'Table'[TableName] = EARLIER ( 'Table'[TableName] ) &&
'Table'[Group] = EARLIER ( 'Table'[Group] )
),
'Table'[DateTime],
, DESC
, DENSE
)Let me know if this works for you 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/