Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi power BI community
I want to make a report that see how much time diffrent people are available in diffrent month, to better plan capacity.
To achieve this I use three different tables.
Table one is a called User
it contains the columns [name], [user_id], [Monday], [Tuesday], [Wnedsday], [Thursday], [Friday]
[user_id] is a number that connects it to the other tables.
The last 5 columns monday - Friday contains the number of hours as a flow the user works that day.
I have a date table called Future
It contains all future days for the next three years
It has a column called [date] that contains the dates and a column that is called month_year that group the date together in the month and year the belong in like this "nov-26" for all dates in November 2026
the final table is called WorkPlanEntry
It contains a [date] that connects it to the future table
a [user_id] that connects it to the User table and a [Title] that shows why a user will not work a specific day. It could say "Holliday"
I also have a measure which calculate all the hours the users should work. it looks like this
Here is my problem. I want to exlude all the Hollidays and sick days from the WorkPlanEntry table.
Can anyone help me do this?
Alle help will be greatly appreciated.
Solved! Go to Solution.
To exclude holidays and sick days from the WorkPlanEntry table, you can modify your measure to filter out entries with Title values indicating holidays or sick days. Here's how you can adjust your Time measure:
Revised DAX Measure:
Time =
VAR _filteredDates =
CALCULATETABLE (
'Future',
NOT (
CONTAINSSTRING ( RELATED ( WorkPlanEntry[Title] ), "Holiday" )
|| CONTAINSSTRING ( RELATED ( WorkPlanEntry[Title] ), "Sick" )
)
)
VAR _countMonday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 1 )
VAR _countTuesday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 2 )
VAR _countWednesday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 3 )
VAR _countThursday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 4 )
VAR _countFriday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 5 )
VAR _totalMonday =
SUM ( 'User'[Monday] ) * _countMonday
VAR _totalTuesday =
SUM ( 'User'[Tuesday] ) * _countTuesday
VAR _totalWednesday =
SUM ( 'User'[Wendsday] ) * _countWednesday
VAR _totalThursday =
SUM ( 'User'[Thursday] ) * _countThursday
VAR _totalFriday =
SUM ( 'User'[Friday] ) * _countFriday
RETURN
_totalMonday + _totalTuesday + _totalWednesday + _totalThursday + _totalFriday
To exclude holidays and sick days from the WorkPlanEntry table, you can modify your measure to filter out entries with Title values indicating holidays or sick days. Here's how you can adjust your Time measure:
Revised DAX Measure:
Time =
VAR _filteredDates =
CALCULATETABLE (
'Future',
NOT (
CONTAINSSTRING ( RELATED ( WorkPlanEntry[Title] ), "Holiday" )
|| CONTAINSSTRING ( RELATED ( WorkPlanEntry[Title] ), "Sick" )
)
)
VAR _countMonday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 1 )
VAR _countTuesday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 2 )
VAR _countWednesday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 3 )
VAR _countThursday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 4 )
VAR _countFriday =
CALCULATE ( COUNTROWS ( _filteredDates ), WEEKDAY ( Future[Date], 2 ) = 5 )
VAR _totalMonday =
SUM ( 'User'[Monday] ) * _countMonday
VAR _totalTuesday =
SUM ( 'User'[Tuesday] ) * _countTuesday
VAR _totalWednesday =
SUM ( 'User'[Wendsday] ) * _countWednesday
VAR _totalThursday =
SUM ( 'User'[Thursday] ) * _countThursday
VAR _totalFriday =
SUM ( 'User'[Friday] ) * _countFriday
RETURN
_totalMonday + _totalTuesday + _totalWednesday + _totalThursday + _totalFriday
Hi @rohit1991
Thanks for the answer. Your suggestion inspired me to use Related Tables and that solved my problem in the end. 🙂
Hi @ThomasWeppler ,
If this Holiday and Sick days data are not required for the entire report, then it is better that you filter these records in the Power Query.
In case if it is required and that you don't need it for this measure, then consider changing the DAX formula as follows.
Note: I am just making an assumption with this measure, not very sure this will work, but may be worth giving a try
Thanks for the suggestion.
I think it might be a good idea to focus on the DAX.
However when I put the DAX
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 72 | |
| 46 | |
| 35 |