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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis expression using a variable

Hi

I want to write a set analysis expression to calculate total sales where [REGION]  is equal to either ‘Africa’, ‘Asia’ or ‘Ireland’

where my total sales amount is a variable called $vSumSales.

Thanks in advance

Labels (1)
7 Replies
sunny_talwar
MVP
MVP

May be this:

=Sum({<REGION = {'Africa', 'Asia', 'Ireland'}>}Sales)

Anonymous
Not applicable
Author

Hi,

Try this:


=Sum({<REGION = {'Africa', 'Asia', 'Ireland'}>}Sales)

Kushal_Chawda
MVP
MVP

try,

=Sum({<REGION = {'Africa', 'Asia', 'Ireland'}>}Sales)

Not applicable
Author

Thanks guys - they were all the correct answer and I realised what I was doing it wrong.

Moving on from this what if for the same view I now wanted sales broken down by the regions mentioned rather than aggregated ? Ie total sales for Africa, Asia and Ireland each

sunny_talwar
MVP
MVP

Create a chart with REGION as dimension and the =Sum({<REGION = {'Africa', 'Asia', 'Ireland'}>}Sales) as expression.

Not applicable
Author

Thanks Sunny - that was glaring me in the face. I think I was trying to take a very difficult route.

sunny_talwar
MVP
MVP

No problem

I am glad we were all able to help you here.