Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
rubenmarin

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 =

rubenmarin

Hi Larisa, you can use:

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

or

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

or

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