Discussion board where members can get started with Qlik Sense.
Can you help me?
I have in my table DATE,STATUS.
I want to create a new dimension DATE_Y_AGO.
The result is something like IF DATE = MAX(DATE) then STATUS = MAX(DATE,12). I want to return how was the STATUS one year ago to compare.
Tks a lot!
If I understand correctly then you should just be able to query the date 12 months ago using AddMonths.
Depending how you want to use it either
The expression =AddMonths(Max(DATE),-12) works to show me one year ago.
But I want to create a cross table like this
DATE 1 YEAR DATE
201801 201802 201803 201804 201805
DATE in columns and DATE year ago in lines. If I use the expression as a dimension returns me an error.
FROM MyTable a
LEFT JOIN MyTable b
ON DATEADD(year,-1,a.ARRDate) = b.ARRDate