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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rsch91
Helper I
Helper I

NETWORKDAYS() not excluding holidays

Hi, 

 

I have the following piece of DAX:

 

VAR tabel_vakantiedagen = CALCULATETABLE(
                                SELECTCOLUMNS(Dim_Datum, "Feestdag", Dim_Datum[Datum]),
                                Dim_Datum[IsFeestdag] = 1)

RETURN NETWORKDAYS([Datum gereedgemeld], [Datum factuur], 1, tabel_vakantiedagen) - 1
 
But it's not properly excluding the holidays. How do I bug fix?
1 ACCEPTED SOLUTION
rsch91
Helper I
Helper I

Found the solution. It applied the filter context of the table it was in while it had to ignore it. Just added ALL(Dim_Datum[Datum]) and it worked. 

View solution in original post

9 REPLIES 9
rsch91
Helper I
Helper I

Found the solution. It applied the filter context of the table it was in while it had to ignore it. Just added ALL(Dim_Datum[Datum]) and it worked. 

BeaBF
Super User
Super User

@rsch91 Hi! try with:

VAR tabel_vakantiedagen =
CALCULATETABLE(
SELECTCOLUMNS(Dim_Datum, "Datum", Dim_Datum[Datum]), -- Use "Datum" instead of "Feestdag"
Dim_Datum[IsFeestdag] = 1
)

RETURN NETWORKDAYS([Datum gereedgemeld], [Datum factuur], 1, tabel_vakantiedagen) - 1

 

BBF

Thank you, it doesn't work unfortunately 😞

@rsch91 Dim_Datum[Datum] is a date column? 

 

BBF

It is. And IsFeestdag is a column too. 

@rsch91 column ok, but it's date type?

 

BBF

Datum is a date type. IsFeestdag is a whole number and has two options: 0 and 1 (so boolean). 

@rsch91 can you paste some sample data?

 

BBF

I don't really know how - my company uses semantic models. Do you have a link to a tutorial or something? Thanks for your help

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.