Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

I have a dimension called Country Name, which has values USA, UK and SA and the spend associated with them is 100, 200 and 300 (Field name is Amount).

I am writing an expression as follows:

=sum({$<[Country Name] = {'USA'}>} Amount)

I filter on UK node in the Country Name dimension ( I have a created a list box on this dimension). I expected the above expression to return a value of 0, but it is returning 100, which is the spend associated with USA. Can someone explain this to me?

How should i change my code so that I get a value of 0 whenever I filter on any non-USA node in the dimension.

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this

=sum({$*<[Country Name] = {'USA'}>} Amount)

or

You can use this also

=sum({<[Country Name] *= {'USA'}>} Amount)


Hope it helps

Celambarasan

View solution in original post

1 Reply
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this

=sum({$*<[Country Name] = {'USA'}>} Amount)

or

You can use this also

=sum({<[Country Name] *= {'USA'}>} Amount)


Hope it helps

Celambarasan