Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

markgraham123
Contributor II

Ignore null values while calculaitng average

Hi,

Can someone pls tell me how to ignore null values while calculating average??

Al though we can do it by suppressing null value....

i'm displaying it in text box due to requirement.

Please find the attachment.

Any help is highly appreciated.

I wanna eliminate in text box but not in the script please.

1 Solution

Accepted Solutions

Re: Ignore null values while calculaitng average

Right now the Date is not Null, it is '-'. For this sample, try this:

='Average     '&Num(Avg(Aggr(Count({<Date -= {'-'}>}Distinct User),Date)), '#,##.00')

For actual null, you can try this:

='Average     '&Num(Avg(Aggr(Count({<Date = {'*'}>}Distinct User),Date)), '#,##.00')

2 Replies

Re: Ignore null values while calculaitng average

Right now the Date is not Null, it is '-'. For this sample, try this:

='Average     '&Num(Avg(Aggr(Count({<Date -= {'-'}>}Distinct User),Date)), '#,##.00')

For actual null, you can try this:

='Average     '&Num(Avg(Aggr(Count({<Date = {'*'}>}Distinct User),Date)), '#,##.00')

markgraham123
Contributor II

Re: Ignore null values while calculaitng average

Sunny,

It worked.

You are awesome. I should have used the set analysis..

Thanks again brother.

Community Browser