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.
since I'm new, I have not tried anything worth mentioning here, sorry
CodePudding user response:
Use this calculated column
Rank =
VAR ThisID = 'Table1'[ID]
RETURN
RANKX(
FILTER(
'Table1',
'Table1'[ID] = ThisID
),
'Table1'[start Date],
,
ASC,
DENSE
)