cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Days Until Date+3 Years

Clay
8 - Cloud Apps
8 - Cloud Apps

Hello,

I am trying to calculate how many days until a certain date, provided date+3 years within a formula.  All I want to do, for example, is show how many days it is until expiration, given expiration is 3 years after the provided date, but I can't quite figure out how to do this.  I know Sisense and date functions are like oil and water for some reason but this isn't that difficult of a calculation.  I should also mention, editing the underlying data source or elasticube (live model in this case) is not (nor should it have to be with a BI tool) an option.  Scripting would be a last resort but not off the table.  Any help would be greatly appreciated!

Logically it would be something like this, but of course this doesn't work (not worried about leap years so 365*3=1095 to simplify)

 

 

DDiff(NOW(),[MyDate]+1095)

 

 

 A very simple Excel formula for reference as well:

 

 

DATEDIF(TODAY(),EDATE(A2,36),"d")

 

 

 

1 ACCEPTED SOLUTION

HamzaJ
12 - Data Integration
12 - Data Integration

Hey @Clay 

Wouldnt this work for you?

 

max(ddiff(NOW(),[MyDate]))+1095

When this reaches 0 the term will expire

 

Hamza

View solution in original post

3 REPLIES 3

HamzaJ
12 - Data Integration
12 - Data Integration

Hey @Clay 

Wouldnt this work for you?

 

max(ddiff(NOW(),[MyDate]))+1095

When this reaches 0 the term will expire

 

Hamza

Clay
8 - Cloud Apps
8 - Cloud Apps

Thank you @HamzaJ!  This isn't exactly what I needed but it sparked an idea to make something close to this work.

DRay
Community Team Leader
Community Team Leader

Hello @Clay,

I wanted to follow up to see if the solution offered by @HamzaJ worked for you.

If so, please click the 'Accept as Solution' button so that other users with the same questions can find the answer faster. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)