Forum Discussion
Anonymous
4 years agoNot applicable
Datediff Formula question
Hi Guys, I cant get this formula to work the way I want it. This formula works perfectly but I also want it to caluclate If the resolved date is empty, I want it to calualte created date to cur...
- 4 years ago
I see you wanted to do is to calculate for those rows created date is before 7/31/2020 and resolved date is blank or after 7/31/2020.
For the rows, you want to adjust the resolved date blank as the cut off date "7/31/2020".
Tryout 2 Open Age = IF ( -- only those rows with created date <= 7/31/2020 and resolved date as blank or after 7/31/2020 ('FreshService RAW DATA'[Created Date] <= Date(2020,7,31) && ( IsBlank('FreshService RAW DATA'[Resolved Date] || 'FreshService RAW DATA'[Resolved Date] > Date(2020,7,31) ) ), DATEDIFF( 'FreshService RAW DATA'[Created Date], IF ( IsBlank('FreshService RAW DATA'[Resolved Date] ), Date(2020,7,31), 'FreshService RAW DATA'[Resolved Date] ) , DAY) )
sevenhills
4 years agoSuper User
I updated the reply ... ignore this
Try replace and see if this work for you
'FreshService RAW DATA'[Created Date]
as
If( IsBlank('FreshService RAW DATA'[Created Date]), Today())
Anonymous
4 years agoNot applicable
What do you mean like this? Mar 19 Open Age = If(Isblank('FreshService RAW DATA'[Created Date],Today())<=Date(2019,3,31),'FreshService RAW DATA'[Resolved Date]>Date(2019,3,31)),DATEDIFF('FreshService RAW DATA'[Created Date],DATE(2019,3,31),Day))