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())
Proud to be a Super User!
@ManuApo , Create a new column like
if([Employee Action] =1, rankx(filter(Table, [Employee Action] =1 && [ID] =earlier([ID])), [Date],,asc,dense), blank())
Proud to be a Super User!
Power BI User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
User | Count |
---|---|
394 | |
140 | |
107 | |
83 | |
53 |
User | Count |
---|---|
418 | |
160 | |
139 | |
113 | |
84 |