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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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