Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 Abb | Day Name Abb | Year | Work Day | Work Date | WkDay | Holiday |
| Apr | Mon | 2024 | Monday, April 1, 2024 | 04/01/24 | TRUE | FALSE |
| Apr | Tue | 2024 | Tuesday, April 2, 2024 | 04/02/24 | TRUE | FALSE |
| Apr | Wed | 2024 | Wednesday, April 3, 2024 | 04/03/24 | TRUE | FALSE |
Then I have a time tracker table:
| User | Group | Category | Time Worked | Work Day | After Hours | Comments |
| John Doe | ABC | Administrative | 1 | Monday, April 1, 2024 | No | Notes to add |
| John Doe | ABC | Operational Support | 5 | Monday, April 1, 2024 | No | Notes to add |
| John Doe | ABC | Project | 2.5 | Monday, April 1, 2024 | No | Notes to add |
| John Doe | ABC | Unplanned Operational Support | 2 | Monday, April 1, 2024 | No | Notes to add |
| John Doe | ABC | Planned Operational Support | 5 | Tuesday, April 2, 2024 | No | Notes to add |
| John Doe | ABC | Project | 2.5 | Tuesday, April 2, 2024 | No | Notes to add |
| John Doe | ABC | Unplanned Operational Support | 3 | Tuesday, April 2, 2024 | No | Notes to add |
| John Doe | ABC | Planned Operational Support | 8 | Wednesday, April 3, 2024 | No | Notes to add |
| John Doe | ABC | Planned Operational Support | 1 | Thursday, April 4, 2024 | No | Notes 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.
Solved! Go to Solution.
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)
)
)
Proud to be a 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)
)
)
Proud to be a Super User! | |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 45 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |