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

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

question about set expression

Hi,

If I need to calculate the Budget for Category 1 only I can use the following expression:

sum ({<Categories = {'Category1'}>} [Budget])

But my task is to calculate quite the opposite - all other categiries except Category1.

How should I change this expression so that I could calculate the Budget for all other Categories except Category1?

Thank you in advance,

Larisa Filonova

1 Solution

Accepted Solutions
rubenmarin1

Hi Larisa, you can use:

sum ({<Categories = Categories-{'Category1'}>} [Budget])

or

sum ({<Categories -= {'Category1'}>} [Budget])

or

sum ({<Categories = {"*"}-{'Category1'}>} [Budget])

View solution in original post

3 Replies
Not applicable
Author

sum ({<Categories -= {'Category1'}>} [Budget])


It'll give you a syntax error but ignore it, syntax checker doesn't like the -= part even though it works fine.

maleksafa
Specialist
Specialist

sum ({<Categories -= {'Category1'}>} [Budget])


-= instead of =

rubenmarin1

Hi Larisa, you can use:

sum ({<Categories = Categories-{'Category1'}>} [Budget])

or

sum ({<Categories -= {'Category1'}>} [Budget])

or

sum ({<Categories = {"*"}-{'Category1'}>} [Budget])