Difference between two dates

  • 15 March 2023
  • 2 replies

Userlevel 2


I need to create a IF condition that shows : IF date 1 > date 2, then blablabla.


Date 1 : Current date, it’s a metric

Date 2 : Go Live date, it’s a date from a transaction

I did this formula :

But I have this error.


Here is my Month Dimension : 


Thanks for your help :)


Best answer by francois 15 March 2023, 10:37

View original

2 replies

Userlevel 6
Badge +14

Hi @JuliaSp ,

It seems your Date 1 / Current Date is actually Month-formatted, so not a date like your Date 2.

If you want to compare them, you’ll have to do either of those:

'Date 1'.'Start Date' > 'Date 2'

'Date 1'.'End Date' > 'Date 2'

depending on what you need.

In the screenshot provided, Date 1 is Feb 23 - so you’ll have to choose between Feb 1 and Feb 28 as a comparison date, choosing the relevant property in each case.


Also looking at the formulas in place, you can instead use TIMEDIM rather than ITEM to find the relevant month.



You could have a formula like this 'ARR not deployed'.'Go Live Date' >= 'Current Date'.'Start Date' instead of trying to map your date to a month and then back to a date.


Comparing Months together does make sense though - if you think it’d be relevant to type something like TIMEDIM('ARR not deployed'.'Go Live Date', Month) >= 'Current Date' (not currently valid), please submit this as an idea in the Product Idea section of the community.


Userlevel 2

It worked, thank you so much for your help!