Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
now I have the next problem by comparing two time periods. Comparing the periods where all dates are in one year is ok.
Now I have the problem by comparing the periods, where the startdate is one year before the enddate (e.g. startdate 01.10.2010 and enddate is 30.09.2011)
Therefore I need the compared timeperiod one year befor (e.g. startdate 01.10.2009 and enddate is 30.09.2010).
I tried it with following formula without success:
sum({<(JARECDAT >= makedate(year(vMinDatum)-1,month(vMinDatum),day(vMinDatum)) and
JARECDAT <= makedate(year(vMaxDatum)-1,month(vMaxDatum),day(vMaxDatum)))>} Umsatz)
JARECDAT= Each date of all years (eg. 01.01.2009, 02.01.2009, 03.01.2009 ... 28.09.2011)
vMinDatum = Variable where I pick the startdate
vMaxDatum = Variable where I pick the enddate
Umsatz= turnover, which I trie to compare
Does anyone has an idea?
Thanks for your help.
Regards
NewQlikie
HI,
Try this way.
sum({<(JARECDAT = {">=$(=Addmonths(vMinDatum,-12))<=$(=Addmonths(vMaxDatum,-12))"}>} Umsatz)
Regards,
Kaushik Solanki
HI,
Try this way.
sum({<(JARECDAT = {">=$(=Addmonths(vMinDatum,-12))<=$(=Addmonths(vMaxDatum,-12))"}>} Umsatz)
Regards,
Kaushik Solanki
Thank you very much. That works perfectly!
Regards,
NewQlikie
Hi newqlikie,
This case seems similar with mine, would you attach the qlikview file, i really need an example .
Thanks