Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Oomsen
Helper III
Helper III

Working hours until today

With the measure below i calculate the workable hours:

Werkuren = IF('Medewerker uren'[Dag]=2;7,6;0)&IF('Medewerker uren'[Dag]=3;7,6;0)&IF('Medewerker uren'[Dag]=4;7,6;0)&IF('Medewerker uren'[Dag]=5;7,6;0)&IF('Medewerker uren'[Dag]=6;7,6;0)
 
I would like to adjust the measure or create a new one to exclude al hours after today.
1 ACCEPTED SOLUTION

@v-diye-msft 

It didn't solve the problem. 

But with some try and error i found the solution:

I changed my measure to :
Werkuren tot vandaag = CALCULATE(SUM('Medewerker uren'[Werkuren]);FILTER(Dimdate;Dimdate[Datum]<=TODAY()))
 
 

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Oomsen 

 

Could you please specify the meaning of your formula? I can barely understand it. It’s preferred to share us your detailed data (upload your pbix to Onedrive and share links here) but kindly masking your confidential info.

 

We’d like to provide further support once we got it.

 

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi @v-diye-msft 

 

The measure is ment for counting available working hours and compare them with the actuals worked hours of employees. 

I will translate it to english:

Working hours = IF('Employee hours'[Day]=2;7,6;0)&IF('Employee hours'[Day]=3;7,6;0)&IF('Employee hours'[Day]=4;7,6;0)&IF('Employee hours'[Day]=5;7,6;0)&IF('Employee hours'[Day]=6;7,6;0)
 
Our working days contain 7,6 hours. So what i did is count 7,6 if the day is a monday, tuesday, wednesday, thursday or friday. I display this per month and can see what the "workable" hours are per month.
 
I compare this with the actuals hours and report a % of worked hours witch is nog more then dividing actuals by workable hours.
But when i do this nowm, i compare actuals (correct) with all workable hours (incorrect). That is why i would like to adjust my measure so that in only count 7,6 hours a day until today.
 
 

Hi @Oomsen ,

 

FIf my understanding is correct, you'd like to compare the standard workhours with actual workhours. your standard workday is from Monday to Friday, with 7.6 hours per day.  

I created a calenday table list from 7/1 -today, then add the calculated column to specify the weekday, finally add the measure to generate the total standard workhours: results shown as below, you can find the pbix here: 

https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EUoRzHnN7cNFlU7wMJjuQ9...

Capture.PNG

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

@v-diye-msft 

It didn't solve the problem. 

But with some try and error i found the solution:

I changed my measure to :
Werkuren tot vandaag = CALCULATE(SUM('Medewerker uren'[Werkuren]);FILTER(Dimdate;Dimdate[Datum]<=TODAY()))
 
 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.