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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Good Day Folks,
Having a bit of a brain cramp on this one....
I have the following Payroll Table Visual:
| Week Start (Sun) | Date |
Employee |
Entity | Location | Hours Worked |
| 1/21/2024 | 1/22/2024 | 101939 | ABC | 1 | 16 |
| 1/21/2024 | 1/21/2024 | 100037 | XYZ | 2 | 16 |
I then have different Payroll Calendars for each specific Entity. For ABC, sample data as follows:
| Entity | PayDate | StartDate | EndDate | TimesheetApproval |
| ABC | 2/2/2024 | 1/21/2024 | 1/27/2024 | 1/29/2024 |
| ABC | 2/9/2024 | 1/28/2024 | 2/3/2024 | 2/5/2024 |
I would like a Measure to calculate "Days to Approval" ( 1/29/2024 - TODAY() ) to add to my first table visual, but must be specific by Entity.
| Week Start (Sun) | Date | Number | Entity | Location | Hours Worked | Days to Approval |
| 1/21/2024 | 1/22/2024 | 101939 | ABC | 1 | 16 | 5 |
| 1/21/2024 | 1/21/2024 | 100037 | XYZ | 2 | 16 |
As always, any help or guidance is much appreciated!
Kind Regards,
Solved! Go to Solution.
NB : im not sure if this code will work for you since i dont have an idea of the tables and the model you are using.
the sample data i have worked on :
no relation between the 2 tables
final result :
NB :: you can change the filter conditions base on your business logic . .
let me know if it works for you .
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that thumbs up button 🫡👍
NB : im not sure if this code will work for you since i dont have an idea of the tables and the model you are using.
the sample data i have worked on :
no relation between the 2 tables
final result :
NB :: you can change the filter conditions base on your business logic . .
let me know if it works for you .
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that thumbs up button 🫡👍
Hi Daniel, I didn't include a data model because it is quite complex.
It finally clicked to start down the Variable path.....so I'm working on a solution very similar to yours.
Appreciate your time and response on this.....confirmed for me I am on the right path to a more complete solution.
Best Regards,
@Daniel29195 check this
Proud to be a Super User! | |
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 69 | |
| 60 | |
| 47 | |
| 20 | |
| 16 |