Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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.

Tags (1)
1 Solution

Accepted Solutions

Re: Set analysis

Hi,

Check with this

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

or

You can use this also

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


Hope it helps

Celambarasan

1 Reply

Re: Set analysis

Hi,

Check with this

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

or

You can use this also

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


Hope it helps

Celambarasan

Community Browser