Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi all,
I am working on some processflow data, where I need to check who the last user is for approval within two approval types. Below table showcases how my data looks like, with the last two columns (in bold) being the result I am looking for.
DateTime | ID | Type | Action | User | Last Approval 1 user | Last Approval 2 user |
01.01.2022 10:00 | 1 | Approval 1 | Approval | AA | DD | EE |
01.01.2022 12:00 | 1 | Approval 2 | Approval | BB | DD | EE |
01.01.2022 12:30 | 1 | Edit | Edit | CC | DD | EE |
01.01.2022 14:00 | 1 | Approval 1 | Approval | DD | DD | EE |
01.01.2022 15:00 | 1 | Approval 2 | Approval | EE | DD | EE |
I am looking for solutions in either DAX or Power query.
Thanks beforehand.
Solved! Go to Solution.
Hi,
I managed solve this question eventually. Posting it here, if anyone has the same issue:
I create a calculated column that identifies that last entry for Approval 1, I also make a second calculated column where I replace Approval 1 (Marked with bold) with approval 2, to get one column for each approval.
Hi,
I managed solve this question eventually. Posting it here, if anyone has the same issue:
I create a calculated column that identifies that last entry for Approval 1, I also make a second calculated column where I replace Approval 1 (Marked with bold) with approval 2, to get one column for each approval.
I think it should work to use RANK() to order them (assuming on datetime), if you ranked them descending instead of ascending and took the #1 rank that would be the last item. If you're trying to rank over some particular field as the differentiator, use RANKX() instead.
User | Count |
---|---|
65 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
85 | |
75 | |
56 | |
50 | |
45 |