cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
zaidmasad Member
Member

Date Difference with blank values

Hello,

 

I have an issure with this code, that calculates the transit time between two dates, when the last date is blank. Is there a way to add a function to that code, so it gives a blank value when one of the two dates are blank?

 

count = var calendarTable= CALENDAR([Start Date],[End Date])
var exceptDate=CALCULATETABLE(VALUES('Situational Holidays'[situationDate]),FILTER(ALL('Situational Holidays'),[Entity]=EARLIER(Dates[Origin Entity])))
var filtered=ADDCOLUMNS(EXCEPT(calendarTable,exceptDate),"Day Of Week",WEEKDAY([Date],1))
return
COUNTROWS(FILTER(filtered,[Day Of Week]<>6&&[Day Of Week]<>7))
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Date Difference with blank values

@zaidmasad,

 

You may use ISBLANK Function as follows.

IF ( ISBLANK ( [Start Date] ) || ISBLANK ( [End Date] ), BLANK (), [count] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
bsas Member
Member

Re: Date Difference with blank values

Hi @zaidmasad,

 

Try to use IF(OR(date1="", date2= ""), "", "your calculation")

zaidmasad Member
Member

Re: Date Difference with blank values

@bsas thank you, but it didnt work with me

bsas Member
Member

Re: Date Difference with blank values

What is the issue?

Community Support Team
Community Support Team

Re: Date Difference with blank values

@zaidmasad,

 

You may use ISBLANK Function as follows.

IF ( ISBLANK ( [Start Date] ) || ISBLANK ( [End Date] ), BLANK (), [count] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 285 members 3,191 guests
Please welcome our newest community members: