Forum Discussion
Date Difference with blank values
- 8 years ago
Hi ManNVSM,
Thanks for your help. You gave me the idea of using dummy data so I did this and came up with this formula:
Days to close = if('Breach Register'[Breach closed date]=BLANK(),'Breach Register'[Breach closed date],1.0*'Breach Register'[Breach closed date]-'Breach Register'[Date that breach discovered])
This seems to work ok.
Thanks for your help again.
Dear Bimster,
You need to combine your DateDiff DAX with IF.
Ex: New Day to close = CALCULATE( IF ( CLoseDate <> blank(), [your DateDif Formular] , ""))
Regards,
ManNVSM.
- Bimster8 years agoFrequent Visitor
Hi ManNVSM,
I just tried this and am getting the above error:. Any idea on how to resolve this. The underlying data is being pulled through from a SharePoint list.
- Anonymous8 years agoNot applicable
Dear Bimster
Try this again with ALLEXCEPT.
Ex: New day to close = CALCULATE(IF('Breach Register'[Breach closed date] <> BLANK(),DATEDIFF('Breach Register'[Date that breach discovered], 'Breach Register'[Breach closed date], day)
, ALLEXCEPT ('Breach Register'[Title]))Regards,
ManNVSM.
- Bimster8 years agoFrequent Visitor
Thanks for the help. I've tried this with the allexcept addition and the same error message is appearing.
It seems to be very complicated to do a date difference whilst ignoring blanks.