Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
192 | |
79 | |
70 | |
50 | |
42 |