Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How can i combine two sets into one expression?

How can I combine the following 2 sets into one expression?

I want to ignore current selections for the first part, but not the second.

I want to combine the following;

Set 1 = SUM({1<Year={2009},Month={11}>} Sales)
Set 2 = SUM({$<Area={'North'},Group={'Direct'}>} Sales)

Is is possible??

Thanks for your time.

3 Replies
Not applicable
Author

Hi,

It depends what you want to achive by combining. If you need an arthemetic operation between Set 1 and 2 then can directly join them. If you want set 1 and set 2 to made for union/intersection or any other "set theory" operations, QV support them thru set analysis operators. You can read about them more in QV help (Section "Set Operators" in "set analysis")

Hope this helps you,

Kiran Rokkam.

Not applicable
Author

Hi

think of them of 2 sets of data:

sum( { <set1> + <set2> } formula).

in your case you can put the other fields you may choose as using the * character on the first expression (ex below with field 'ConsumerId' )

sum( { <ConsumerId={'*'}, Year={2009},Month={11}> + <Area={'North'},Group={'Direct'}> } Sales)


Anonymous
Not applicable
Author

Thanks for the adrianoalmeida.

I used the following.

SUM({1<Year={2009},Month={11}> + $<Area={'North'},Group={'Direct'}>} Sales)

However i am getting unexpected results. I want the Area and Group selections to be based on the results of the Year and Month Set, but this doesn;t seem to be happening.

Any ideas anyone??