Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET ANALYSIS help

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


27 Replies
Not applicable
Author


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 🙂

rubenmarin

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.

jyothish8807
Master II
Master II

Hi Soren,

Have you tried what i have suggested?

Regards

KC

Best Regards,
KC
Not applicable
Author

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

Not applicable
Author

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.

Not applicable
Author

Hi Lakshmi

As you can see in the attached QV file it doesnt quite work??

Not applicable
Author

try with this

=Count({$<date = {'>=$(=vLastMonthStart)<=$(=vLastMaxDate)'}>} DISTINCT itemnr)

it works .

-Charitha

Not applicable
Author

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>