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

COUNT NETWORKDAYS if Start Date is not blank or > 01/08/2023

Hi Everyone,

 

I cannot seem to get this to work and hoping someone can help me identify the issue?

My Custom Column is:

 

IF(NOT(ISBLANK(job_number[Start Date])) && (job_number[Start Date] > 01/08/2023),NETWORKDAYS(job_number[Start Date],Today(),1))
 
It works in the fact that it won't provide a count if the Start Date is blank, however it still is providing a count on jobs where the date is before 1/08/2023.

I have a feeling it's to do with the "&&" however I can't get OR expression to work. (Admittedly I am a novice in Power BI).
1 ACCEPTED SOLUTION

There's a few things that I would check then - the first is date format (as in are you using USA date format or the rest of the world format), especially in the comparison date "01/08/2023". 

 

And also, how are you inputting that date - i think you should be using DATE(2023, 8, 1) for 1st Aug 2023. Otherwise, I'm not sure if I have any more ideas. 

Good luck with solving this!

View solution in original post

5 REPLIES 5
Idrissshatila
Super User
Super User

Hello @Jays_D ,

 

I see this video helpfull when dealing with working days and working hours.

 

check it out https://youtu.be/6JA6uy3ZRBA

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




vicky_
Super User
Super User

or is || (which should be shift + the key above enter).

Otherwise, there is an OR function. The syntax for that is OR(condition 1, condition 2)

Thank you @vicky_  - I've tried OR a few times but DAX just doesn't seem to like it. I don't get an error but it won't filter out any jobs > 01/08/2023.

I substituted && with || and again, throws no error but get the same result. It does prevent it from counting the networkdays on items where there is no Start Date but still performs the count on jobs where the Start Date is before 01/08/2023.

Truly appreciate your response, thank you again.

There's a few things that I would check then - the first is date format (as in are you using USA date format or the rest of the world format), especially in the comparison date "01/08/2023". 

 

And also, how are you inputting that date - i think you should be using DATE(2023, 8, 1) for 1st Aug 2023. Otherwise, I'm not sure if I have any more ideas. 

Good luck with solving this!

Thanks @vicky_ 

That was the issue, I was enering the date as a "string" but formatetd as DATE() in my DAX and it has worked. 

Greatly aappreciated, thank you again 🙂

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.