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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
roee1983
Contributor III
Contributor III

Presenting Negetive Values


Hi all,

How can I ignore negative values ?

I have a table with next values

Table A:

pro1,15

pro2,30

pro3,-40

How can I prevent showing the negative record?

thanks

Roee

26 Replies
Not applicable

Hi

by using filter u prevent negetive values

let suppose customer is ur dimension and sum(sales) is expression

in ur dimension tab use below expression

=if(Sales > 0, Company,Null())

then u avoid the negetive values,

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use Rangemax(0, Value) for your expression and make sure that Suppress Zero Values is checked. (Replace Value with the correct field name).

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
techvarun
Specialist II
Specialist II

Hi,

On which level you need to restrict the negative values?

on scrip level or in expression level?

Regards

techvarun
Specialist II
Specialist II

by the below script you can restrict it on the script level

Directory;

LOAD Filed1,

     Field2

FROM

[..\Table1.xls]

(biff, no labels, table is [Sheet1$])

WHERE(Field2 > '0');

rbecher
MVP
MVP

Hi,

do you mean in the load script or in a chart?

- Ralf

Astrato.io Head of R&D
jvitantonio
Specialist III
Specialist III

Hello, if you want to do this in the script, it would be like this:

TableA:

LOAD

Description, Value

From ...

where Value > 0;

If you'd like to do it directly in your pivot, in your expression write:

If(Value >0, Sum(Value), null())

I hope this helps.

J

Not applicable

In the expressions tab, add an if statement as follows:

=if(columnname<0,0,columnname)

In Presentations tab, select the specific column and at the bottom enable check box "Suppress Zero-Values"

vivek_niti
Partner - Creator
Partner - Creator

Hi,

Do you want this to be done in front-end or back-end???

If u have to remove the data from the backend then just add a where condition in the script...

     WHERE VALUE <=0;

or if the condition has to be added in front-end then just add an IF condition to the expression.

     SUM(If((VALUE)>=0,VALUE,0))

Regards,

Vivek

mdmukramali
Specialist III
Specialist III

Dear Roee,

use the below expression.

=if(sum(Price)>0,sum(Price))

i hope it will help u.

kindly find the attachment.

Thanks,

Mukram.

Not applicable

Hi Roee,

Assuming that this is your  data:

Table A:

colA, colB

pro1, 15

pro2, 30,

pro3, -40

You can use this in expression :

If([colB]>0,[colB])
This will hide the negative records.

Hope this helps!