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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
avinashkk696
Contributor III
Contributor III

Suppressing Rows based on the expression value

Hello All,

I have a requirement where I have a table with columns Customer, State and Sales. In the straight table I am taking Customer, State  as Dimensions and Sum(Sales) as expression.


1.JPG

Expected output is,

1.JPG

I want to suppress row which has expression >0.  Any Ideas??

Thanks in advance.

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Add expression 1 to show all the lines, including zero (then hide the field in the settings of the table). Further in fields SUM(SALES) and 1 add Set Analysis expression {<Customer={"=Sum(Value)=0"}>}.

View solution in original post

7 Replies
avinashelite

Try this in expression

if(Sum(Sales) =0,Sum(Sales) )


and un-check the suppress zero values in the presentation tab and check suppress null

avinashelite

Or

Sum({<Sales={0}>}Sales)

MK9885
Master II
Master II

Not sure about your supress thing Maybe try

if(sum(sales)>0,sum(Sales),0)

This will only show values greater than 0

if(sum(sales)<0,sum(Sales),0)

This will show values less than 0.

But you can just Supress Null in Dimensions instead of writing an expression. That would be more easier.

Properties>Dimensions>

Below you'll find a check box to supress null for dimensions

ahaahaaha
Partner - Master
Partner - Master

Hi,

may be as attached file

Andrey

ahaahaaha
Partner - Master
Partner - Master

Add expression 1 to show all the lines, including zero (then hide the field in the settings of the table). Further in fields SUM(SALES) and 1 add Set Analysis expression {<Customer={"=Sum(Value)=0"}>}.

avinashkk696
Contributor III
Contributor III
Author

Thank you Avinash and Aehman, I have tried your expressions i'm getting the output as below.

1.JPG

I have also unchecked suppress zero values and checked suppress missing. Its not working. I can not suppress dimension as i don't know the value of the expression. So need to suppress row based on the expression.

avinashelite

Try this in your dimension

=if(Aggr(sum(Sales)=0,Customer,STATE),Customer)