Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to compare two year sales, at the same month and same date
ex.
count number of sold items in november this year and compare with sold items sold at the same time last year.
As we have 11. november I want to count number of sold items in november this year = 11 days and
compare with the same amount of days last year i november.
I´ve tried with some help from another thread with something like this
({<year={$(vPreviousYear)},month={$(vMaxMonth)}, day={$(vLastMaxDate)}, itemgroup={75211}>}itemnr)
but this doent work
Hi ruben
It works for last year but as I´ve written previous I need to compare 2013 and 2014
november both years and the first 12 days because we have todays the 12 th noember 🙂
OK, Sorry again, this is a long thread and I was (and I still am) a bit rushing.
Check attachment, hope this is want you want.
Hi Soren,
Have you tried what i have suggested?
Regards
KC
using monthend on previous year gives me whole november equal to 30 days
Monthend this year is only 12 days, so I cant compare
I need to compare the same amount of days previousyear and this year
Try like this
for previous year date range( from 01-11-2013 to 12-11-2013) -
use this expression:
=Count({$<Date = {'>=$(#vLastMonthStart)<=$(#vLastMaxDate)'}>}itemnr)
vLastMonthStart=MonthsStart(11,(today()-365))
for current year as it is
=Count({$<Date = {'>=$(#vMonthstart)<=$(#vLastMaxDate)'}>}itemnr)
vMonthstart=MonthsStart(11,(today()))
hope this helps.
Charitha.
Hi Lakshmi
As you can see in the attached QV file it doesnt quite work??
try with this
=Count({$<date = {'>=$(=vLastMonthStart)<=$(=vLastMaxDate)'}>} DISTINCT itemnr)
it works .
-Charitha
Hi Lakshmi
I got the right answer, thanx for your effort
Look further up the thread for answered
Regards
Soren
Fra: Lakshmi Charitha
Sendt: 13. november 2014 12:20
Til: Schou, Hans Henrik Søren (SSC009)
Emne: Re: - SET ANALYSIS help
Qlik Community<http://community.qlik.com/>
SET ANALYSIS help
reply from Lakshmi Charitha<http://community.qlik.com/people/cheritha?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/655864?et=watches.email.thread#655864>