Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Omitting Zero values for counting

Dear Friends

It is 10 the count with zeros. But I need to avoid zeros & the out put needs to be 6 which is the count after zeros are excluded. The formula used with where clause seems to be not working. Could you please see where the error is?

Thnaks

Neville

 

1 Solution

Accepted Solutions
Taoufiq_Zarra

Hi Neville,

whene you use len(field)>0  it's particularly when its null,

so in your case :

Data:

LOAD * INLINE [
    BRANCH, PAID
    RA, 0
    RA, 100
    RA, 200
    RA, 1000
    RA, 2000
    RA, 2500
    RA, 4500
]where Fabs(PAID)>0;

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

3 Replies
Taoufiq_Zarra

Hi Neville,

whene you use len(field)>0  it's particularly when its null,

so in your case :

Data:

LOAD * INLINE [
    BRANCH, PAID
    RA, 0
    RA, 100
    RA, 200
    RA, 1000
    RA, 2000
    RA, 2500
    RA, 4500
]where Fabs(PAID)>0;

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
nevilledhamsiri
Specialist
Specialist
Author

Hi Taoufiq,

Very happy that you provide us quick answers. You simply doing well. The answer for my issue is resolved. What Fabs does in this respect which is something we use to handle growth related issues where two figures are matched related two two different periods.  

 

Thanks you very much

Neville

 

Taoufiq_Zarra

Hi @nevilledhamsiri 

You can simply use :

Data:

LOAD * INLINE [
BRANCH, PAID
RA, 0
RA, 100
RA, 200
RA, 1000
RA, 2000
RA, 2500
RA, 4500
]where PAID<>0;

but I prefer  absolute values Fabs

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉