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: 
Aanchal
Contributor II
Contributor II

Count and If not working

Hello ,

I am stuck with this requirement where i have a Customerno. in corresponding to it i have amount value +ve and -ve  . so, anywhere if customerno comes more than 1 . 

If(Count(Customerno>1 and sign(Amount) = +ve or Sign(Amount) = -ve ) it should create a new coloum as X. 

I have also used aggr(if ) . But i am not able to get correct result. I am using QlikView.

Please suggest.

Labels (1)
3 Replies
vinieme12
Champion III
Champion III

Your description doesn't match the expression you posted

1) count(Customer> 1  ?   are your trying to see if  ( count of Customerno) > 1 ??  OR customerno>1  ??

2) sign(Amount) +ve or -ve :  not sure if you want to exclude Amount=0 ?? OR exclude  SUM(Amount)=0 ??

Also are you trying to create a Measure or a Dimension in the chart?

 

Can you post a snapshot or example of what your data looks like and the expected output

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Aanchal
Contributor II
Contributor II
Author

Hello Vinieme12 Champion III,

aggr(if(Count(Customerno)>1 and Sign(Amount = +1 )or Sign(Amount)=-1,'Mismatch'),Customerno) 

Condition i have to apply is wherever it finds same custno there if the amount is positive or negative it should be returned in column mismatch only the word mismatch will work. 

vinieme12
Champion III
Champion III

1) count(Customerno)>1   :     count(Customerno )  aggregated by Customerno will always be =1 !!

also

2)   Sign(Amount) =1  or Sign(Amount)=-1  :  this logically means Sign(Amount) should be 0 !!

 

Can you post a snapshot or mockup of what you are trying to achieve

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.