Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add a condition to get rid of zero amount using a variable

Hi

I am trying to eliminate the zero values in my expression,(so that all the consultants with 0 debts do not get displayed in my table) using the variable that i have created,i tried:

 

 

 

=

Thanks in advance.

if($(vActiveDebt)>0,
$(vActiveDebt),0)

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

dont keep the "0" in the else part of the IF condition.

if($(vActiveDebt)>0,$(vActiveDebt))

alternatively, you can suppress the zero's by checking the Suppress Zero Values option in the Presentation tab.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

dont keep the "0" in the else part of the IF condition.

if($(vActiveDebt)>0,$(vActiveDebt))

alternatively, you can suppress the zero's by checking the Suppress Zero Values option in the Presentation tab.

Not applicable
Author

Hi

It does show other values which are > 0 but the 0 ones appears as follows:

ConsultantName           DebtAMount

xxxxxx                             -

yyyyyy                             -

I did tick the suppress zero-value on the presentation tab. 

Anonymous
Not applicable
Author

Try checking "Supress when value is null" on the dimension tab.

swuehl
MVP
MVP

Are you showing other expressions, that do evaluate to <> zero? 'Suppress zero values' only works on lines where all expressions evaluate to zero. Use conditionals on the other expressions to set them to zero, too, if possible.

Not applicable
Author

Hi Johannes

In this case the dimension is not null.What i suspect is that qlikview does not recognise my variable as a number,that is why the suppress zero value does not work ,how can i rather convert this into a number?

Thanks.

Not applicable
Author

Hi swuehl

You are so right.I took out other expressions and it worked.

Thanks a lot guys.