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

Hide lines based on formula

I have a straight tabe with some dimensions like order number, customer name etc. and some formulas that calculate the produced quantity, the delivered quantity and the ready for dispatch quantity. The dispatch quantity is simply "produced minus delivered". This results in a table that looks like this:

Table1.PNG

I want to get rid of all lines in this table where the "Ready for dispatch" column has a "0" value:

Table2.PNG

Is there a nice way to do this in the properties somewhere? I tried my luck with the surpress zero values, but this did not work out the way I wanted.

Many thanks for your help!

Günter

1 Solution

Accepted Solutions
pokassov
Specialist
Specialist

Hi!

if([Ready for dispatch(kg)]>0,put_here_your_expressions_for_each_column).

For example, I have 3 expressions:

sum(sales),

count(id),

max(days)   <--- this I want to use for check zero

then

if(max(days)>0,sum(sales))

if(max(days)>0,count(id))

max(days)


View solution in original post

7 Replies
pokassov
Specialist
Specialist

Hi!

if([Ready for dispatch(kg)]>0,put_here_your_expressions_for_each_column).

For example, I have 3 expressions:

sum(sales),

count(id),

max(days)   <--- this I want to use for check zero

then

if(max(days)>0,sum(sales))

if(max(days)>0,count(id))

max(days)


Anonymous
Not applicable
Author

please send us the expression you use

Not applicable
Author

You can try in all expression,

if(sum(Produced)<>sum(Delivered),.......required expression, null()).... PFA

Not applicable
Author

Hi

U can write like this (if u r trying to show them in straight table in qlik)

if(([produced(kg)]-[delivered])>0,([produced(kg)]-[delivered]))

dont put anything in else part ...and give ok

make sure that u shd have write these two exp (produced,delivered) before this exp..

Anonymous
Not applicable
Author

Hi Gunter ,

In Second your expected table in Dispatch qty column's expression you should write below code-

if(sum(ProducedQty) <> sum(DeliveredQty) ,sum(Produced)-sum(Delivered) ).

Hope this would be helpful.

Not applicable
Author

Hello Sergey,

this seems to be the right approach. I have my formulas based on your proposal which brings me to the correct table, but the totals are wrong...

This is again an Excel screenshot to show the difference. The first line shows the totals calculated by Excel (which are correct for the values shown) and the last line the total that comes from QlikView. Obviously the totals are not effected by the formula. How can this be changed?

Table3.PNG

Thanks,

Günter

Not applicable
Author

Seems that this solved the problem...

Table4.PNG

I have changed in the formula page the total value from "all values" to "sum" - everything works now perfectly fine. Thank you for all your contributions!