Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for
Did you mean:
Specialist

## 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
MVP

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
MVP

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')

Specialist
Author

Sunny,

It worked.

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

Thanks again brother.

Community Browser