Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I successfully loaded a master calendar with Year, Month and Day which reflects order date. I want to find the total sales in previous year when currency code is USD.
The expression I am using is Sum({<[CurrencyCode]={'USD'},OrderDate={=MakeDate(Year-1,num(Month),Day)}>}Sale), but Qlikview returns me an error.
Can anybody tell me what went wrong and how to fix it? Thanks so much!
Best Regards,
Gloria
I believe you need to use an expansion on the second condition. Try somthing like this.
Sum({<
[CurrencyCode]={'USD'}
,OrderDate={$(=MakeDate(Year-1,num(Month),Day))
}>}Sale)
is your order date associated to master calendar?
=sum( {$<[CurrencyCode]={USD},Year={$(=max(Year)-1) }>} Sale)
Hi Erik,
Thank you for your reply. But this one seems not work. One of my concern is actually when multiple dates are selected. For example, when Year=2014, Month=01, Day=01,02,03,04,05, can I use makedate to display 01/01/2014,01/02/2014,01/03/2014, 01/04/2014,01/05/2014? If MakeDate does work, can I use OrderDate=Makedate(Year-1, num(Month), Day) to get the data when OrderDate=01/01/2013,01/02/2013,01/03/2013,01/04/2013, 01/05/2013?
Thank you so much!
Best Regards,
Gloria