Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I need help with the following scenario.
I have a table where sales representatives' training information exists:
| Sales Rep | Training | Date |
| A | X | 12/1/2024 |
| A | Y | 15/2/2024 |
| A | Z | 17/3/2024 |
| B | X | |
| B | Y | 12/2/2024 |
| B | Z | |
| C | X | |
| C | Y | 2/2/2024 |
| D | X | 3/3/2024 |
| D | Y | 2/3/2024 |
| D | Z |
And there is also a table that shows the transactions done by each sales rep:
| Sales Rep | Transaction ID | Transaction Date |
| A | 1 | 2/1/2024 |
| A | 2 | 12/1/2024 |
| A | 3 | 16/2/2024 |
| B | 4 | 17/3/2024 |
| B | 5 | 1/2/2024 |
| B | 6 | 2/3/2024 |
| C | 7 | 2/4/2024 |
| C | 8 | 3/1/2024 |
| D | 9 | 11/1/2024 |
| D | 10 | 9/1/2024 |
| D | 11 | 3/4/2024 |
| E | 12 | 13/3/2024 |
| E | 13 | 16/3/2024 |
| E | 14 | 5/3/2024 |
I need to evaluate sales reps' performance after the trainings by calculating the count of Transaction ids considering that Transaction Date should be after or equal to the Training Date.
The output should be something like:
| Sales Rep | Training | Transaction count after training | Transaction Date |
| A | X | 1 | 12/1/2024 |
| A | X | 1 | 16/2/2024 |
| D | X | 1 | 3/4/2024 |
| A | Y | 1 | 16/2/2024 |
| B | Y | 1 | 17/3/2024 |
| C | Y | 1 | 2/4/2024 |
| D | Y | 1 | 3/4/2024 |
| A | Z | 0 | |
| B | Y | 1 | 2/3/2024 |
Which I can then use to assess the training metadata like this:
| Training | Transaction month | Transaction count after training |
| X | Jan-24 | 1 |
| X | Feb-24 | 1 |
| X | Apr-24 | 1 |
| Y | Feb-24 | 1 |
| Y | Mar-24 | 2 |
| Y | Apr-24 | 2 |
| Z | 0 |
Any idea how this can be achieved? I need to do this in DAX as the tables are very large and cannot do more transformations in PQ.
Thanks a lot for any help.
Solved! Go to Solution.
Thanks a lot, this worked!
Best regards!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 22 | |
| 12 | |
| 10 | |
| 10 | |
| 9 |