Forum Discussion
AlexPayette
3 years agoFrequent Visitor
Rankx function showing all 1 in a calculated column
Hi, I am trying to use the Rankx function to order my different shifts starting with 1 desc. I have a fact table which showcases my shifts everyday. There's two shifts, day shift (from 6h AM to 5...
- 3 years ago
Rank = var ReferenceDate = 'Table'[Shift End Date] return CALCULATE( RANKX( ALL('Table'), 'Table'[Shift End Date], ReferenceDate , DESC, Dense ), ALLEXCEPT('Table', 'Table'[Shift Start Date], 'Table'[Shift End Date] ) )
amitchandak
Super User
3 years agoAlexPayette , You have use date time dump column
Column = RANKX(FILTER(Data, Data[Shift End Date] =EARLIER([Shift End Date]) && Data[Shift Start Date] = EARLIER([Shift Start Date])), [Date Time Dump],,DESC,Dense)
AlexPayette
3 years agoFrequent Visitor
It's not working, it's giving me all 1 again.