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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
MEBOW
New Member

Date Filter for Measure

Hi, I have been digging thru a lot of posts for a solution and there are alot of great guidance but I keep getting stuck. 

 

I have two tables: 

 

Date Table 

Month Name AbbDay Name AbbYearWork DayWork DateWkDayHoliday
AprMon2024Monday, April 1, 202404/01/24TRUEFALSE
AprTue2024Tuesday, April 2, 202404/02/24TRUEFALSE
AprWed2024Wednesday, April 3, 202404/03/24TRUEFALSE

 

Then I have a time tracker table: 

 

UserGroupCategoryTime WorkedWork DayAfter HoursComments
John DoeABCAdministrative1Monday, April 1, 2024NoNotes to add
John DoeABCOperational Support5Monday, April 1, 2024NoNotes to add
John DoeABCProject2.5Monday, April 1, 2024NoNotes to add
John DoeABCUnplanned Operational Support2Monday, April 1, 2024NoNotes to add
John DoeABCPlanned Operational Support5Tuesday, April 2, 2024NoNotes to add
John DoeABCProject2.5Tuesday, April 2, 2024NoNotes to add
John DoeABCUnplanned Operational Support3Tuesday, April 2, 2024NoNotes to add
John DoeABCPlanned Operational Support8Wednesday, April 3, 2024NoNotes to add
John DoeABCPlanned Operational Support1Thursday, April 4, 2024NoNotes to add

 

I am creating a measure called "Working Days" where it's a count of the WkDay = TRUE when it's this month/year at the time table.   It just does not seem to see the page filters which is passing the Month Name = April and the Year  = 2024

 

WorkingDays =
CALCULATE(
COUNTROWS('Date Table'),
FILTER(
'Date Table',
'Date Table'[WkDay] = TRUE
&& YEAR('Date Table'[Work Date]) = YEAR(MAX('Date Table'[Year]))
&& LEFT(MONTH('Date Table'[Work Day]), 3) = LEFT(MONTH(MAX('Date Table'[Work Day])), 3)
)
)

 

Any suggsetions/directions would be appreciated.

 

 

1 ACCEPTED SOLUTION
Kaviraj11
Super User
Super User

Hi,

 

Can you try this out:

 

WorkingDays =
CALCULATE(
    COUNTROWS('Date Table'),
    FILTER(
        ALL('Date Table'),
        'Date Table'[WkDay] = TRUE
        && YEAR('Date Table'[Work Date]) = YEAR(MAX('Date Table'[Year]))
        && LEFT(MONTH('Date Table'[Work Day]), 3) = LEFT(MONTH(MAX('Date Table'[Work Day])), 3)
    )
)

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
Kaviraj11
Super User
Super User

Hi,

 

Can you try this out:

 

WorkingDays =
CALCULATE(
    COUNTROWS('Date Table'),
    FILTER(
        ALL('Date Table'),
        'Date Table'[WkDay] = TRUE
        && YEAR('Date Table'[Work Date]) = YEAR(MAX('Date Table'[Year]))
        && LEFT(MONTH('Date Table'[Work Day]), 3) = LEFT(MONTH(MAX('Date Table'[Work Day])), 3)
    )
)

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.