Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis A - B not working properly

Hello Community,

I'm struggling for a few days now without success using Set Analysis for a complicated goal.

I have a Sales table, with customers, products, year and product family, among other unecessary fields.

I want to show a concat list of product families that each customer bought in 2014 but not in 2015.

My progress so far is:

Concat( {<Year = {2014}> - <Year = {2015}>} DISTINCT ProductFamily, ', ')

But this doesn't seem to work. My guess is that it's not excluding the ProductFamily from first set, but the whole row, which obviously doesn't exist.

This means that my result is:

If customer bought x, y, z in 2014 and nothing in 2015, it shows x, y, z (always shows whole 2014 as the result)

If customer bought x, y, z in 2014 and x in 2015, it shows nothing (always empty if customer bought anything in 2014 AND 2015)

I have been trying to achieve something like this:

<{ ProductFamily = { <Year = {2014}> ProductFamily - <Year = {2015}> ProductFamily } }>

But, unsurprisingly (bad syntax heh) it doesn't work.

Any clues?

Thanks!

10 Replies
Not applicable
Author

Absolutely right!

Ladies and Gentleman, we have a new champion!

Thank you!!!