Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get rid of certains dimensions values on the fly? (Pivot)

Dear all,

As per below, I want to get rid of 2 records when I make SUM() instructions:

I want to exclude 'CHINA BOTTLING OIL' and 'CHINA VEGOIL TRADING'........

How can I easily implement this? MAPPING Instructions? Calculated Dimension?

I've naively tried this without success ;-> :

=[Country/Location] <> 'CHINA BOTTLING OIL' and [Country/Location] <> 'CHINA VEGOIL TRADING'  because it leads to '0' or '-1'

How to get rid of certain values.jpgNot works.jpg

Thank you,

Michaël.

1 Solution

Accepted Solutions
Not applicable
Author

Hello Michael,

you are not so far away from the solution. What you see is the result of an condition, this my be true or not. ('0' or '-1')

The only thing to do is to put your condition into your aggregation function, similar to this: sum(value) -->

sum( if(

[Country/Location] <> 'CHINA BOTTLING OIL' and [Country/Location] <> 'CHINA VEGOIL TRADING' , value))

May be you have to check for syntax.

Regards, Roland

View solution in original post

2 Replies
Not applicable
Author

Hello Michael,

you are not so far away from the solution. What you see is the result of an condition, this my be true or not. ('0' or '-1')

The only thing to do is to put your condition into your aggregation function, similar to this: sum(value) -->

sum( if(

[Country/Location] <> 'CHINA BOTTLING OIL' and [Country/Location] <> 'CHINA VEGOIL TRADING' , value))

May be you have to check for syntax.

Regards, Roland

Not applicable
Author

Thanks Roland!!