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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jays_D
Advocate I
Advocate I

Don't count Networkdays as 1 if same day

Hi All,

 

I have a custom column which calculates Networkdays between 2 dates, and it will only calculate if a start date and end date are present, otherwise it shows as blank. What I cannot seem to get it to do is provide a "0" value if Start Date and End Date are the same day. I have tried to append "-1" at the end of my DAX but that just returns a -1 on values that are blank.

 

This is my DAX:

= IF(NOT(ISBLANK(client_table[Client Meeting Date])) && NOT ISBLANK (client_table[picked up date]),NETWORKDAYS(client_table[Client Meeting Date],client_table[picked up date],1),BLANK())
 
Would appreciate some direction/help please ! Still learning the ropes of Power BI !


Many thanks in advance!
1 ACCEPTED SOLUTION
JoeBarry
Solution Sage
Solution Sage

Hi @Jays_D 

 

You can try this.

Networkdays = DATEDIFF(client_table[Client Meeting Date], client_table[picked up date], DAY)

Thanks

Joe

View solution in original post

3 REPLIES 3
LiMo
Regular Visitor

If using network days to exclude weekends, any suggestions rather than using datediff?

JoeBarry
Solution Sage
Solution Sage

Hi @Jays_D 

 

You can try this.

Networkdays = DATEDIFF(client_table[Client Meeting Date], client_table[picked up date], DAY)

Thanks

Joe

I cannot believe how over complicated my DAX was !

This has solved it, thank so much @JoeBarry 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.