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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to remove specific values of a field in a sum expression


Hello everyone,

I need to create a bar chart which displays the sum of specific values of a field called "Categoria".

Below is the printscreen of the field in my data base:

categoria.JPG

I don´t want to sum the values "Mulheres" and "Homens", it should be removed from the result of the sum.

Thanks,

12 Replies
Anonymous
Not applicable
Author

cud u share your expression?

buzzy996
Master II
Master II

some of the above solutions will work and the othr way

on ur dimension tab

=If(Categoris ='Mulheres',Null(),

If(Categoris ='Homens',Null(),Categoris ))


or


=If(Categoris ='Mulheres',Null(),

If(Categoris ='Homens',Null(),year ))

and click check box,supress null values and ur expression is sum(specific values)

that helps

Not applicable
Author

At the dimension level:

if(Categoria<>'Mulheres' and Categoria<>'Homens', Categoria)

Here is my expression:

sum([OcupantesTotal])/sum({<Categoria={'Regular Employee'}>}[OcupantesTotal]))

It seem the result calculation is for all years, and my expression needs to give me the sum of each year.

total.jpg