Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaysingh29
Contributor III
Contributor III

Expression Help (Count)

Hi All,

Need your help, I have a pivot table in which I wanted to display count of +ve/-Ve values & actual sum in third column.

I am using following formula in expression :

=count({$<[ Amount]={'<0'}>}[ Amount])  &

=count({$<[Amount]={'>0'}>}[ Amount]) 

However its showing me values  which are $-0 & $0.00. I don't want to consider these records in my pivot object.

expression.PNG


Thanks in advance.

1 Solution

Accepted Solutions
Not applicable

count({<sign([ Amount])={-1}>}<[ Amount])

&

count({<sign([ Amount])={1}>}<[ Amount])

this will not consider 0 values

View solution in original post

15 Replies
avinashelite

Try like this

Go To chart properties > Presentation tab >Check the  Suppress Zero values

That should solve the problem

sdmech81
Specialist
Specialist

May be this:

=count({$<[ Amount]={'<0'},Amount]-={'-0'}>}[ Amount])

=count({$<[Amount]={'>0'},Amount]-={'0.00'}>}[ Amount])

Try

Not applicable

count({<sign([ Amount])={-1}>}<[ Amount])

&

count({<sign([ Amount])={1}>}<[ Amount])

this will not consider 0 values

View solution in original post

ajaysingh29
Contributor III
Contributor III
Author

Thank you Manoj & All for your time n reply!

avinashelite

I don't think the above expression will work !!! could share the sample app where its working for you ???

avinashelite

sdmech81‌ did Monaj  expressions work's for you ??

sdmech81
Specialist
Specialist

Hi Avinash,

Not infront of machine..

I think it should work bcs sign will return -1,0,1 ..

Then when he says sign(AMT)=-1 it means all negative values other even excluding zeros..

Ll confirm Avinash once infront of machine.. Thanks

avinashelite

I don't think so , expression at both the ends in set analysis don't work

sdmech81
Specialist
Specialist

avinashelite‌,

Just put the same in text object but I am getting error with this

count({<sign([ Amount])={-1}>}[ Amount])

Hope u also did the same ..

@AJay, Can u Plss paste expression,which u used??

Sachin