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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mft_87
Helper I
Helper I

The value is null but the formula is showing pass, based on my condition, need help

I am trying to calculate whether a job is a pass or fail based on the SLA using below formula:

 

Finish Date SLA = IF(F_TASKS[TA_FINISH_DATE] <= F_TASKS[TA_EST_DATE],"Pass","Fail" )
 
but for some jobs the TA_FINISH_DATE (Date Closed) has not been updated yet, so due to null value the condition still says it is a pass as per the below image: what I need is, if there is a null value it should either take todays date and do the calculation to pass/fail. I am new to power bi and trying to learn stuff, i would highly appreciate any support.

 

Capture.PNG

 

Regards,

 

Fahad

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

So like this?

 

Finish Date SLA = 
  IF(
    ISBLANK(F_TASKS[TA_FINISH_DATE]),
    IF(TODAY() <= F_TASKS[TA_EST_DATE],"Pass","Fail" ),
    IF(F_TASKS[TA_FINISH_DATE] <= F_TASKS[TA_EST_DATE],"Pass","Fail" )
  )

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
v-kelly-msft
Community Support
Community Support

Hi @mft_87

 

Try this :

 

 

Finish Date SLA = 
  IF(
    F_TASKS[TA_FINISH_DATE]= BLANK(),
    IF(TODAY() <= F_TASKS[TA_EST_DATE],"Pass","Fail" ),
    IF(F_TASKS[TA_FINISH_DATE] <= F_TASKS[TA_EST_DATE],"Pass","Fail" )
  )

 

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Greg_Deckler
Super User
Super User

So like this?

 

Finish Date SLA = 
  IF(
    ISBLANK(F_TASKS[TA_FINISH_DATE]),
    IF(TODAY() <= F_TASKS[TA_EST_DATE],"Pass","Fail" ),
    IF(F_TASKS[TA_FINISH_DATE] <= F_TASKS[TA_EST_DATE],"Pass","Fail" )
  )

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

worked perfectly and the result is correct as expected, thank you very much.

 

I need alot of support from this forum to be a power bi champ.

 

Really appreciate.

 

Any time @mft_87 !

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@mft_87 , Try like

//march release

Finish Date SLA = IF(F_TASKS[TA_FINISH_DATE] <= coalesce(F_TASKS[TA_EST_DATE], today()),"Pass","Fail" )

 

//Before march release

Finish Date SLA = IF(F_TASKS[TA_FINISH_DATE] <= if(isblank(F_TASKS[TA_EST_DATE]),today(),F_TASKS[TA_EST_DATE]),"Pass","Fai

 

Thank you very much for your quick reply, but it is giving me the same result.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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