cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stuznet
Helper V
Helper V

IF ISBLANK Return Blank

 

Hi guys,

 

 

 2018-10-10_8-06-46.png

Basically, if Date2 is blank then Age column should be blank because there is nothing to compare to. 

 

DaysBetweenDates = IF(ISBLANK([Date1),BLANK(),([Date2] - [Date1)*1.)

 

I'm struggling correcting this formula

 

Column = IF(ISBLANK('Table1'[DaysBetweenDates]),BLANK(),IF(''Table1'[DaysBetweenDates]< 46,"< 45 Days","45+ Days"))

 

Thanks

1 ACCEPTED SOLUTION

I think you need to check both for blank before you make the calculation here:

 

DaysBetweenDates = IF(ISBLANK([Date2]),BLANK(),if(ISBLANK([Date1]),BLANK(),([Date2] - [Date1)*1.))

 

Then your 2nd one would work.

 

View solution in original post

6 REPLIES 6
gooranga1
Impactful Individual
Impactful Individual

Hi @Stuznet

 

Shouldn't your first formula be the one below?

 

DaysBetweenDates = IF(ISBLANK([Date2),BLANK(),([Date2] - [Date1)*1.)

Hi @gooranga1 the second formula is the one I'm looking for

gooranga1
Impactful Individual
Impactful Individual

I can't see your data but the second formula is reliant on the first. Are you 100% sure the first formula is returning Blank()?

 

From your sample data the first formula may not return blank as Date1 is never blank and the so the 2nd part of the first formula will always execute which is Date2 - Date1?

 

Maybe add DaysBetweenDates to your table so you can see what this is actually returning as it clearly it isn't returning Blank().

2018-10-10_9-55-30.png

It is calculating something eventhough Date2 is blank 

I think you need to check both for blank before you make the calculation here:

 

DaysBetweenDates = IF(ISBLANK([Date2]),BLANK(),if(ISBLANK([Date1]),BLANK(),([Date2] - [Date1)*1.))

 

Then your 2nd one would work.

 

View solution in original post

@JoyCornerstone Kudos to you. Thank you 🙂 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!