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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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