5 Replies Latest reply on Jan 30, 2017 7:33 AM by Lior Barak

# How to Compare date X with date X-90

Hi everyone,

I know this will be a super stupid question but I can't find a solution at this point, and time is not on my side.

What I wish to present is a list of dates, the value they had, and the value - 30 days

SUM( IF [Dt] = DATEADD('day', -30, [Dt]) THEN ZN( [QAU] ) ELSE 0 END )

I remember this never worked for me in the past, but there was a work around, can someone give me a hand here.

Thanks

Leo

• ###### 1. Re: How to Compare date X with date X-90

Hi Lior,

Not sure if may approach based on lookup-functionality is applicable in your situation but find it below and stored in attached workbook version 9.3

• ###### 2. Re: How to Compare date X with date X-90

Hi Lior,

Below link will guide you to achieve the year on year and quarter on quarter comparision.

Thanks,

Dhruv Gupta

• ###### 3. Re: How to Compare date X with date X-90

Hi,

Not what I was looking for just yet.

In my case it will by a dynamic time-frame that will be displayed (weeks/months...) and I will need it to take a point of date and bring back what happened 30 days before.

• ###### 4. Re: How to Compare date X with date X-90

Hi Lior

Something likes this....

• ###### 5. Re: How to Compare date X with date X-90

yes, but it should be relative to the date and not to today, this is the issue I have at this point :-/

IF [Dt] = DATEADD('day', -90, [Dates]) THEN [Qau] ELSE 0 END