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
payroll table structure
I have been able to build many calaculations from these, but this one is the simplest thing I cannot get to work and have tried multiple methods.
Solved! Go to Solution.
Sorry for the blurry images
I got the problem solved by changing the relationship between calendar and payroll to bi-directional
Now just trying to figure out how to speed up the DAX query becuase its slow when evaluating all employees (over 10K)
Sorry for the blurry images
I got the problem solved by changing the relationship between calendar and payroll to bi-directional
Now just trying to figure out how to speed up the DAX query becuase its slow when evaluating all employees (over 10K)
Hi @Anonymous ,
You could get the start date and end date by using min() and max() function for each user.
start_ = calculate(MIN('payroll'[date]),ALLEXCEPT('payroll','payroll'[user]))
end_ = calculate(max('payroll'[date]),ALLEXCEPT('payroll','payroll'[user]))
Then you could calculate the weeks between start date and end date by using datediff() function.
weeks_ = datediff([start_],[end_ ],week)
Best Regards,
Jay
Thanks for the reply, your solution would only work if the people worked in continuous weeks without any weeks off.
Hi @Anonymous
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Altough your explanation is complete has you can imagine redoing your model based on images only is very complicated can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |