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
mrslyfox
Helper II
Helper II

Number of Working days up to Now

Hi there


How to calculate number of working days for each month of the year, where
the current month have to show number of days between 1st day of month and NOW().
For the working dates I have additional column with indicator of where is working day or not.

1 ACCEPTED SOLUTION

Hi @mrslyfox,

 

Try this formula please:

 

MeasureSumWorkdays =
CALCULATE (
    SUM ( 'Calendar'[WorkingDay] ),
    FILTER ( 'Calendar', 'Calendar'[LINK_Date] <= TODAY () )
)

Number of Working days up to Now .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

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

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @mrslyfox,

 

How do you want to show them up? As a Calculated column or a measure?

As a Calculated Column, you need a [Month] column:

 

TotalWorkdayPerMonth =
CALCULATE (
    COUNT ( DateTable[IsWorkday] ),
    FILTER (
        ALLEXCEPT ( 'DateTable', DateTable[Month] ),
        'DateTable'[IsWorkday] = 1
            && 'DateTable'[Date] <= TODAY ()
    )
)

Number of Working days up to Now.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As a measure, we can sum up indicator of workday directly due to it's 0 and 1.

 

MeasureSumWorkdays =
CALCULATE ( SUM ( DateTable[IsWorkday] ), 'DateTable'[Date] <= TODAY () )

Number of Working days up to Now2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

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

Hello @v-jiascu-msft

 

Please check sample model I have, measure not working as expected.

https://we.tl/JVauvk4B5P

Hi @mrslyfox,

 

Try this formula please:

 

MeasureSumWorkdays =
CALCULATE (
    SUM ( 'Calendar'[WorkingDay] ),
    FILTER ( 'Calendar', 'Calendar'[LINK_Date] <= TODAY () )
)

Number of Working days up to Now .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

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

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.