• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to create an index column based on dates in another column

Hello

I would like to create a helper column or index column based on my reporting date. The reporting date are random. They are sometimes 4 days,7 days apart or even 10 days apart.
Secondly several rows have the same reporting date.

I want to create a helper column that gives the reporting date an ordinal number so I can use them for filtering in dax

Report Date Index
1/21/2018 0
1/21/2018 0
1/19/2018 -1
1/19/2018 -1
1/14/2018 -2
1/7/2018 -3
1/7/2018 -3
 
Why not do it directly in DAX with the RANKX function?
RANKX(<table>, <expression>, <value>, <order>, <ties>)
Not available in V1 r2008 of PP though.
 
Back
Top