Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Saurabh07
Contributor III
Contributor III

To eliminate entries where sum of values is 0

Hello Gurus,

I have the mentioned data set,

CountryValue
Algeria10
Andorra1
Angola0
Anguilla0
Algeria2
Andorra9
Angola0
Anguilla0
Algeria7
Andorra3
Angola2
Anguilla0
Algeria3
Andorra6
Angola5
Anguilla0

 

Now I am trying to eliminate the country 'Andorra' and all other countries whose sum of Values is 0. I have successfully eliminated 'Andorra' from my pivot table with mentioned expression:

sum({<Country -= {'Andorra'}>}Value), but struggling to achieve the second condition. So my desired output in pivot form has to be;

CountrySum of Value
Algeria22
Angola7

 

Can anyone please help me out here?

3 Solutions

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

In that case your expression will be.

Sum({<Country = {'=Sum(Value)>0'}> - <Country = {"Andorra"}>}Value)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

Taoufiq_Zarra

@Saurabh07its a sample table

or you can always do :

in Country dimension use :

if(aggr(sum(Value),Country)>0,Country) and uncheck include null value

and in measure sum({<Country -= {'Andorra'}>}Value)

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

Kushal_Chawda

14 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

sum({<Country = {'=Sum(Value)>0'}>}Value)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Taoufiq_Zarra

@Saurabh07  sum of value or one value ?

Angola for example sum of value >0, if you use juste the expression sum({<Country -= {'Andorra'}>}Value) you get the same output

CountrySum of Value
Algeria22
Angola7
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Taoufiq_Zarra

Taoufiq_Zarra_0-1603380371694.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Saurabh07
Contributor III
Contributor III
Author

Hello @Taoufiq_Zarra,thank you for the response. I am not sure how you are getting this output. Below in snap of my pivot table in Qlik;

Saurabh07_0-1603431499982.png

So here along with Andora, I also wish to eliminate Anguilla and all other countries whose sum of values is 0.

Saurabh07
Contributor III
Contributor III
Author

Hello @kaushiknsolanki This looks fine, but I am struggling to accommodate multiple constraints here. I intend to eliminate specific countries (Andorra in this case) along with all other countries for whom sum of values is 0 (Anguilla in this case)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

In that case your expression will be.

Sum({<Country = {'=Sum(Value)>0'}> - <Country = {"Andorra"}>}Value)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lisa_P
Employee
Employee

In your chart settings in the Properties panel, in Data, Dimensions, Country use the Limitation as per below. Exact value >0

Lisa_P_0-1603432525460.png

And the result should be:

Lisa_P_1-1603432652746.png

 

Taoufiq_Zarra

@Saurabh07  you just need sum({<Country -= {'Andorra'}>}Value)  and to unchek this

Capture.PNG

 

uncheck

Capture.PNG

 

sorry i use french version

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Saurabh07
Contributor III
Contributor III
Author

@Taoufiq_Zarra  This looks awesome. May I know which Pivot you are using here? the menu which I see for you is slightly different from mine!

Saurabh07_0-1603434506662.png

And I don't see any option in my menu pane which will allow me to uncheck Zero Values