Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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?
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
Solved! Go to Solution.
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
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
@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] )
)
Proud to be a Super User! |
|
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |