March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Comunity,
Im struggling to create a counter column with DAX where filtering by ID, returns 1, 2, 3, 4... based on a column date date ( earlier > later ) and when the column Employee Action = 1
This will be an example of my data including also the ideal result:
ID | Date | Employee Action | Counter |
1001 | 25/01/20 | 1 | 2 |
1001 | 23/01/20 | ||
1001 | 20/01/20 | 1 | 1 |
1001 | 18/01/20 | ||
1002 | 03/02/20 | 1 | 2 |
1002 | 24/01/20 | ||
1002 | 18/01/20 | 1 | 1 |
Having on mind that it could be more than 2 actions per ID and I want to count them chronologically ( earlier > later)
I tried to use an IF statement, also COUNTAX, COUNTX ..... I gave up 😞
Please I would really appreciate if someone can help me here
Thanks,
Manu
Solved! Go to Solution.
@ManuApo , Create a new column like
if([Employee Action] =1, rankx(filter(Table, [Employee Action] =1 && [ID] =earlier([ID])), [Date],,asc,dense), blank())
@ManuApo , Create a new column like
if([Employee Action] =1, rankx(filter(Table, [Employee Action] =1 && [ID] =earlier([ID])), [Date],,asc,dense), blank())
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |