Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am creating an application that needs to be able to look at how often different employees have changed jobs. I need to know how many "Job Changes" each person has. To do this, I have the records of all employees and the different Business Titles that they have held. The logic for the calculation would be to count the number of Business Titles that a person has, subtract one, and you have their "Job Changes" amount.
An example of the data would be something like this:
Employee ID Business Title
1548964 HR Generalist
1548964 HR Specialist
1548964 HR Manager
1548964 HR Director
The value I would want for this person would be 3 Job Changes.
How can I calculate this value for each specific employee ID? Is there a way to do a loop calculation or something similar? I came up with a solution by creating a new measure in Dax, but I need the value to be in the query editor so that I can filter on the values later. For exampe, I will need to select only those who have had 4 job changes.
Any help is appreciated.
Thanks!
Solved! Go to Solution.
Hi, in Query Editor (no M way)
1. Select Employee Id- Pivot Columns - Count Business Title
2. Select both columns - Unpivot Columns
3. Select Value Column --Transform - Standard - Substract Enter 1 Ok
4. Change Headers Name
Hi, in Query Editor (no M way)
1. Select Employee Id- Pivot Columns - Count Business Title
2. Select both columns - Unpivot Columns
3. Select Value Column --Transform - Standard - Substract Enter 1 Ok
4. Change Headers Name
This worked perfectly.
Thanks for the help!
Hi @ClintClark,
you can use a calculated column with this DAX :
# Job Changes =
CALCULATE(
COUNTROWS( VALUES(t1[Business Title]) ),
ALLEXCEPT(t1, t1[Employee ID])
) - 1
HTH,
Frank
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 137 | |
| 102 | |
| 71 | |
| 67 | |
| 65 |