Forum Discussion
tomwolswijk
Helper I
6 years agoRank date in PowerBI
Hi, I'm looking for a DAX formule to rank the date kolomn. No extra filters on Client ect, just rank the date. Every month new data is loaded in the PowerBI model. Now i want to add a Kolomn so ...
- Anonymous6 years ago
Hello @tomwolswijk ,
You can test this calculated column.
Rank = RANKX ( 'Table', RANKX ( 'Table', YEAR ( 'Table'[Date] ),, DESC, DENSE ) * 100 + RANKX ( 'Table', MONTH ( 'Table'[Date] ),, DESC, DENSE ), , ASC, DENSE )More details can be found here.
Best regards
Stephen Tao
If this post helps,then consider Accepting it as the solution to help other members find it faster.
Anonymous
6 years agoNot applicable
Hello @tomwolswijk ,
You can test this calculated column.
Rank =
RANKX (
'Table',
RANKX ( 'Table', YEAR ( 'Table'[Date] ),, DESC, DENSE ) * 100
+ RANKX ( 'Table', MONTH ( 'Table'[Date] ),, DESC, DENSE ),
,
ASC,
DENSE
)
More details can be found here.
Best regards
Stephen Tao
If this post helps,then consider Accepting it as the solution to help other members find it faster.
tomwolswijk
Helper I
6 years agoThanks a lot! It worked!
I used 'Table'[Month] instead of 'Table'[Date], because month is already a date data type. Thanks!