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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
ArchStanton
Impactful Individual
Impactful Individual

Working Days

I have a Working Days column that produces True / False in my Calendar that works perfectly fine:

 

Working Days = NOT WEEKDAY('Date'[Date]) IN {1,7}

 

I would like to incorporate my Public Holidays calendar to the column.

I have tried adding RELATED (see below) but that doesn't work

 

Working Days = NOT WEEKDAY('Date'[Date]) IN {1,7} &&
RELATED('bank-holidays'[Public Holiday])

 

Does anyone know how to combine them?

Thanks

 

2 ACCEPTED SOLUTIONS
DataInsights
Super User
Super User

@ArchStanton,

 

Try this calculated column in your Date table. It requires a 1:* relationship between Date and bank-holidays.

 

Working Days = 
NOT WEEKDAY ( 'Date'[Date] ) IN { 1, 7 } && ISBLANK ( COUNTROWS ( RELATEDTABLE( 'bank-holidays' ) ) )

 





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

Proud to be a Super User!




View solution in original post

@ArchStanton,

 

The two expressions are evaluated independently. The first one works as described (check if Date is a weekend). The second one checks if the date in the current row of the Date table exists in bank-holidays table; if it doesn't, then it's considered a working day (assuming it's not a weekend). The assumption is that bank-holidays contains only holidays. Hope that helps.





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
DataInsights
Super User
Super User

@ArchStanton,

 

Try this calculated column in your Date table. It requires a 1:* relationship between Date and bank-holidays.

 

Working Days = 
NOT WEEKDAY ( 'Date'[Date] ) IN { 1, 7 } && ISBLANK ( COUNTROWS ( RELATEDTABLE( 'bank-holidays' ) ) )

 





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

Proud to be a Super User!




Can you briefly explain how this works please?

 

My understanding is that NOT produces a list of FALSE values if the Date is a Weekend (not a work day), then this list is used as Lookup to the Bank Hoilday table where all NONBLANKS (public holidays) are also counted as FALSE - the 2 are then combined.

 

Is that correct - does it make sense?

 

@ArchStanton,

 

The two expressions are evaluated independently. The first one works as described (check if Date is a weekend). The second one checks if the date in the current row of the Date table exists in bank-holidays table; if it doesn't, then it's considered a working day (assuming it's not a weekend). The assumption is that bank-holidays contains only holidays. Hope that helps.





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

Proud to be a Super User!




yes thank you, much appreciated!

That works perfectly - thank you!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.