Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone i need help as i am not able to find a solution of the problem.I want to calculate Yera To Date sales ,i am able to do it but my issue is that i want to calculate YTD such that it shows me YTD from the starting year as january till the month i select in the calender eg how should i write an expression for the calculation of YTD from jan till mar.
Thanks in advance
Ferha Jafri
Hi,
Try this expression.
sum({<Date ={">=$(=YearStart(Max(Date)))<=$(=MonthEnd(Max(Date)))"},Year=,month=>}[Sales Amount])
One more thing. The year for Date :01-04-2004 is wrong in your data it should be 2004 but your data shows it as 2002.
Check your data properly.
Regards,
Kaushik Solanki
Hi,
Have a look at the link below.
http://community.qlik.com/message/207344#207344
http://community.qlik.com/thread/2255
Regards,
Kaushik Solanki
Thanks for your reply ,but nothing is showing in my graph![]()
Hi,
Make sure that you have removed the selection of other fields.
Something like this in your set analysis.
Year=,Month=,Quarter=,Day=
You must unselect the selection you have done.
If possible send a copy of your Qvw file.
Regards,
Kaushik Solanki
Plz Check i sent the file.
Hi,
Try this expression.
sum({<Date ={">=$(=YearStart(Max(Date)))<=$(=MonthEnd(Max(Date)))"},Year=,month=>}[Sales Amount])
One more thing. The year for Date :01-04-2004 is wrong in your data it should be 2004 but your data shows it as 2002.
Check your data properly.
Regards,
Kaushik Solanki
Thank you so much.