Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is my formula for YTD figures of sales and it is
working properly :
=SUM({<Jaar_Kalender={'$(vMaxYear)'},%Key_Datum={'<=$(vMaxDate)'},Maand_Kalender=,Dag_Kalender=,MaandJaar_Kalender=>}Waarde_Levering)
Now, I’m trying to calculate the YTD figure of last year
with following formula :
=SUM({<Jaar_Kalender={'$(vPriorYear)'},%Key_Datum={'<=$(vPriorYearDate)'},Maand_Kalender=,Dag_Kalender=>}Waarde_Levering)
Whereas
vMaxDate | 31 aug 2013 |
vMaxDay | 31 |
vMaxMonth | aug |
vMaxYear | 2013 |
vPriorMonth | jul |
vPriorMonthYear | 2013 |
vPriorYear | 2012 |
vPriorYearDate | 31 aug 2012 |
But I always get zero figures.
Can someone tell me what is wrong in the formula above ?
u can use the following exp
((((sum({$<Year = {$(=max(Year-1))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} ($(Amount))))
Thanks a lot. It is working. Great
However could you explain the part : Month = {"<=$(=max({<Year={$(=max(Year))}>} Month)
Just for understanding.
Thanks
Met vriendelijke groeten - Best regards
Peter Moyaert
Chief Financial Officer
<http://www.laroyduvo.be/?utm_source=emailsignature&utm_medium=email&utm_term=&utm_content=&utm_campaign=corporate>
Industrieweg 98 - 100
9032 Wondelgem
Belgium
www.laroyduvo.be<http://www.laroyduvo.be/?utm_source=emailsignature&utm_medium=email&utm_term=&utm_content=&utm_campaign=corporate>
www.cede.be<http://www.cede.be/>
T.
M.
F.
E.
+3292571344
+32476535783
+3292571358
petem@laroyduvo.be <mailto:petem@laroyduvo.be>
Follow us:
<http://goo.gl/mRru5>[Laroy Duvo on facebook]<http://goo.gl/J02HF>[Laroy Duvo on twitter]<http://goo.gl/RG2Tf>[Laroy Duvo on google plus]<http://goo.gl/BiAm5>
Van: Venkat Reddy Palla
Verzonden: maandag 7 oktober 2013 11:44
Aan: Peter Moyaert
Onderwerp: Re: - YTD LY figures
QlikCommunity<http://community.qlik.com/>
YTD LY figures
reply from Venkat Reddy Palla<http://community.qlik.com/people/PallaVenkatReddy?et=watches.email.thread> in Creating Analytics - View the full discussion<http://community.qlik.com/message/401391?et=watches.email.thread#401391>
Hi
Have you tried the expressions with the variable values directly (ie replace vMaxYear and vMaxDate with their values? Does this work?
It makes a difference if the variables contain a leading = sign or not.
Regards
Jonathan