Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Numbering order of Dates for Dimension in other Column

I’m relatively new to DAX and I believe there should be straight forward solution for this problem.

I have ID for customers and corresponding periods, for which we have orders for them.
These are not in particular order, so I need to add a column in which, for each ID, it shows me what is the first, second, third ..etc period with the customer.

see below the in the third column, what I would expect.
enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

since I’m new, I have not tried anything worth mentioning here, sorry

>Solution :

Use this calculated column

Rank = 
VAR ThisID = 'Table1'[ID]
RETURN
    RANKX(
        FILTER(
            'Table1',
            'Table1'[ID] = ThisID
        ),
        'Table1'[start Date],
        ,
        ASC,
        DENSE
    )

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading