Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Help

Hi, Im using set analysis to sum a field for a certain dimension  :

sum({<[Indicator]={45}>}Number)

I need to add another condition to the analysis to sum those value for Indicator=45 and Measure='Distributor'

Ive had a go but I cant get the syntax right. 

Any help appreciated

Thanks,

Fiorano

1 Solution

Accepted Solutions
Gysbert_Wassenaar

sum({<[Indicator]={45},Measure={'Distributor'}>}Number)


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
Gysbert_Wassenaar

sum({<[Indicator]={45},Measure={'Distributor'}>}Number)


talk is cheap, supply exceeds demand
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this Measure={'Distributor'} to your expression, like this you can add any number of conditions.  Refer Set Analysis section of Help file.


=Sum({<Indicator={45}, Measure={'Distributor'}>}Number)

Hope this helps you.

Regards,

Jagan.


Not applicable
Author

Excellent ! Thanks!

paulyeo11
Master
Master

Good post , because it help me how set analysis work. Since this expression with out year and month.

Not applicable
Author

Hi,

This solution seems to be not working.    I have two textboxes  with the following expressions :

=sum({<Indicator={80},Measure={'Distributor'}>}Number)

=sum({<Indicator={80},Measure={'Reseller'}>}Number)

and the two values are the same. 

To test this I have placed another text box with =sum(Number) and two listboxes each containing Indicator and Measure.  When I select the 80 & 'Distributor' or 80 & 'Reseller' the value in the third textbox changes. 

Any thoughts on why this maybe happening? Or am I using Set analysis for the wrong reason?

Thanks again,

Fiorano

jagan
Luminary Alumni
Luminary Alumni

Hi,

In the below two expressions you are explicitly specifying the Indicator and Measure so the values of this expression won't change even if you change the selections of Indicator and Measure.

=sum({<Indicator={80},Measure={'Distributor'}>}Number)

=sum({<Indicator={80},Measure={'Reseller'}>}Number)

In the third textbox you didn't specified any values in the expression, so the values are changing based on the current selections.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

HI, thanks for your reply.  My question is why isn't the sum of Number different for each of the expressions:

=sum({<Indicator={80},Measure={'Distributor'}>}Number)

=sum({<Indicator={80},Measure={'Reseller'}>}Number)

??

Many thanks,

Fiorano

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check your data whether you have same values for the two expressions in your data.

Regards,

Jagan.

Not applicable
Author

Hi,

Given that the third text box containing ' =sum(Number) ' updates when I select the two types of values that Im trying to use set analysis on - doesnt this show that the data is different for 'Distributor' and 'Reseller' ?

Thanks again,

Fiorano