Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
lapertosa
Not applicable

Compairing Same Data from Different Years

I'm trying to compare the qty sold of items, but I only want to see on my Pivot Table the items that repeat in both 2016 and 2017, how should I do it?

So in the example below, I want to see only item 553, since it sold both in 2016 and 2017 while 554 only sold in 2016.

QlikView Help.png

I'm currently using 2 expressions like this:

Sum(If(Year='2016', QTY))

Sum(If(Year='2017', QTY))

I tried using AND as in Sum(If(Year='2016' AND SUM(IF(Year='2017',QTY) ) <> 0, QTY)), but it didn't work. Any idea?

Thanks!

1 Solution

Accepted Solutions
balar025
Not applicable

Re: Compairing Same Data from Different Years

Hi,

Please find attached application

-Ravi Balar

3 Replies
tomasz_tru
Not applicable

Re: Compairing Same Data from Different Years

You'd better use set analysis and P() function:

Set modifiers with implicit field value definitions ‒ Qlik Sense

balar025
Not applicable

Re: Compairing Same Data from Different Years

Hi,

Please find attached application

-Ravi Balar

lapertosa
Not applicable

Re: Compairing Same Data from Different Years

Thanks a lot! That worked perfectly!