Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting a value where value is a positive/negative number

Hey Guys,

Wondering if anyone can help. I am trying to create an expression if possible that is a sum of a field in my table loaded. But if possible i only want to count 1 in the value in the table is positive. I have both positive and negative numbers in my table.

I thought it might be as simple as:

if(num1 > 0,NumericCount(num1),0)

Any help is much appreciated, Thanks.

1 Solution

Accepted Solutions
mov
Champion III
Champion III

sum(if(Field>0,1,0))

View solution in original post

4 Replies
wallinpeter
Contributor III
Contributor III

I would create new field in script.

Add to new column to table....

if (value>0,1,value) as NewValue

create expression....

sum(NewValue)

mov
Champion III
Champion III

sum(if(Field>0,1,0))

View solution in original post

fred_s
Partner
Partner

Hi David,

Maybe this one?

See attachment

Not applicable
Author

got it guys thanks.

sum(if(ARR_DELAY>0,1,0))