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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
y5famfnatudu
Resolver I
Resolver I

Sum of Working Days till end of this month

Dear All,

 

Some how I can't get the sum of working days till the end of the current month, because I have a filter in the report that is called "isPastDay", how can I overcome this issue?

y5famfnatudu_0-1739529652986.png

The measures are as follows:

Working Days = 
CALCULATE (
    COUNTROWS ( FILTER ( 'Date', 'Date'[Date] <= TODAY () ) ),
    'Date'[isWD] = "1"
)
Working Days ToBe = 
CALCULATE (
    COUNTROWS ( 'Date' ),
    'Date'[isWD] = "1",
    REMOVEFILTERS ( 'Date'[isPast] )
)

What I'm expecting to see, is 41 instead of 250

Your help is so much appreciated.

 

Best regards,

Simon

1 ACCEPTED SOLUTION
y5famfnatudu
Resolver I
Resolver I

I got the measure to work

Working Days ToBe =
VAR _EndOfCurrentMonth =
    EOMONTH ( TODAY (), 0 )
VAR _WDtillEndOfCurrentMonth =
    CALCULATE (
        COUNTROWS ( FILTER ( 'Date', Date[Date] <= _EndOfCurrentMonth ) ),
        Date[isWD] = "1",
        REMOVEFILTERS ( Date[isPast] )
    )
RETURN
    _WDtillEndOfCurrentMonth

View solution in original post

3 REPLIES 3
y5famfnatudu
Resolver I
Resolver I

I got the measure to work

Working Days ToBe =
VAR _EndOfCurrentMonth =
    EOMONTH ( TODAY (), 0 )
VAR _WDtillEndOfCurrentMonth =
    CALCULATE (
        COUNTROWS ( FILTER ( 'Date', Date[Date] <= _EndOfCurrentMonth ) ),
        Date[isWD] = "1",
        REMOVEFILTERS ( Date[isPast] )
    )
RETURN
    _WDtillEndOfCurrentMonth
bhanu_gautam
Super User
Super User

@y5famfnatudu Try using

 

DAX
Working Days =
CALCULATE (
COUNTROWS ( FILTER ( 'Date', 'Date'[Date] <= TODAY () ) ),
'Date'[isWD] = "1"
)

Working Days ToBe =
CALCULATE (
COUNTROWS ( FILTER ( 'Date', 'Date'[Date] > TODAY() && 'Date'[Date] <= EOMONTH(TODAY(), 0) ) ),
'Date'[isWD] = "1",
REMOVEFILTERS ( 'Date'[isPastDay] )
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you @bhanu_gautam 
The measure Working Days ToBe is showing 10 by Feb, but blank by the rest

y5famfnatudu_0-1739533450874.png

 

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors