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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
data_guy_87
Regular Visitor

Measure needed to count all work days with less than 8 hours logged into.

Hello everyone! I need to build a measure that counts all workdays (workdays calculated with MIN(clock in date) and MAX(clock in date) where the sum of [elapsed_hours] is under 8. I have a measure built, but the count does not include work days where no clock ins happened at all. Here is my current measure with a bit of the data I'm working with... as you can see from the raw data, my count should be 3 instead of 2 I am getting currently (current measure isn't capturing April 10th, which is a workday with no clock ins... we want these types of days included in the count). Any help is greatly appreciated!

 

data_guy_87_1-1751563018347.png

 

 

 

 

7 REPLIES 7
v-aatheeque
Community Support
Community Support

Hi @data_guy_87 

Thanks for reaching out to Fabric Community Forum.

To show all continuous dates in the Power BI table visual, even if no activity is logged, first create a Calendar table using the  CALENDER function with the minimum and maximum dates from your data. 

Then, create a relationship between the Calendar table and your fact table on the date column. In the visual, use the Date field from the Calendar table and add the other fields from the fact table. Finally, enable the “Show items with no data” option on the Date field in the visual.


For better understanding i am sharing the PBIX file.

Hope this helps!!

If this post was helpful, consider marking Accept as solution to assist other members in finding it more easily.

If you continue to face issues, feel free to reach out to us for further assistance!

Hi @data_guy_87 

I wanted to follow up to see if the suggestion shared earlier helped you build the measure to correctly count all workdays  including those with no clock-ins  based on your Calendar table and the “Show items with no data” option.

As mentioned, by creating a Calendar table using the CALENDAR function (spanning from MIN to MAX clock-in dates) and linking it to your fact table, then using the Date field from the Calendar table in your visual, you can ensure all workdays appear, even those without activity. Your measure can then evaluate elapsed hours per day and include days under 8 hours or with no data.

If you're still facing challenges or have any follow-up questions, please feel free to let us know. We're here to help!

Looking forward to your update!!

Thank you for being an active member of the Microsoft Fabric Community!

FBergamaschi
Post Prodigy
Post Prodigy

Hi data_guy_87,

I am not sure I got your question. Please help me understand and provide the answers to the below questions

1 - where should I see the 3 instead of the 2? In the image you sent, the measure result is not shown

2 - does the work day column in the picture come from the calendar table?

3 - can you provide the sample data in the picture in a pasted format that I can copy and paste in Power BI and solve?

 

PS you should not create calculated columns with SUMMARIZE, it is very dangerous, I shall offer you a revised DAX code in that respect, plus solve the problem possibly (use ADDCOLUMNS on top of SUMMARIZE)

 

Best

 

@FBergamaschi additional info:

1 - Here is a snapshot of the visual with the measure (LostDays). The bottom row of the snapshot reflects the data table from my original post. 

data_guy_87_0-1752184157009.png

 

2 - The WORK_DAY column is indeed coming from a related calendar table. (It is only 'FALSE' on weekends (SAT/SUN) and holidays. 

3 - Here is the data:

 

ADJ_SIGNON_TIMESTAMP_DATEADJ_SIGNON_TIME_STAMPADJ_SIGNOFF_TIME_STAMPELAPSED_HOURSWORK_DAY
4/11/20254/11/2025 7:194/11/2025 9:202.011TRUE
4/11/20254/11/2025 9:354/11/2025 9:550.336TRUE
4/11/20254/11/2025 10:004/11/2025 10:320.542TRUE
4/11/20254/11/2025 11:214/11/2025 11:210.003TRUE
4/11/20254/11/2025 11:214/11/2025 11:210.003TRUE
4/11/20254/11/2025 14:214/11/2025 14:290.144TRUE
4/11/20254/11/2025 14:314/11/2025 14:320.015TRUE
4/9/20254/9/2025 12:334/9/2025 14:231.834TRUE

 

Not enough sample data.  Please provide sample data that covers your issue or question completely, including all scenarios.

 

Note that DAX has a NETWORKDAYS function where you can directly feed your weekend and holiday details if you want.

Hi  @data_guy_87 

Based on the   suggest can you provide the sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Please show the expected outcome based on the sample data you provided.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

lbendlin
Super User
Super User

To report on things that are not there you need to use disconnected tables and/or crossjoins

In your case that means you need a disconnected calendar table.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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