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

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.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.