Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
anushree1
Specialist II
Specialist II

Exclude Nulls on Avg

HI ,

I have an expression like avg(aggr(Sum({<>}),Dim1,Dim2)) and i happen to see that avg is calculated including nulls in this case .

For eg if have Years and Div as Dim2 and Dim1

say Div1 10 has data for all 10 Years and Div2 has data for 9 Years my avg has sum/ count viz., 9 But its taking sum/count(10)

Labels (1)
3 Replies
anushree1
Specialist II
Specialist II
Author

Sample Data attached

Here For C Avg should be 90 but the value appearing is 15

ogautier62
Specialist II
Specialist II

Hi,

may be you can try this in your set analysis :

Sum({< Value=P({*}  >})  to exclude null values

sunny_talwar
MVP
MVP

Or this

Avg({<Value = {"*"}>}aggr(sum(Value),Div,Year))