Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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())
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |