Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ndeeleysww
Creator
Creator

Aggregate by avg

Hi,

I have some alarm counts joined to rainfall data. I need to count my alarm instances if the average rainfall for the day is greater than 0.

I have this but it's not working - any ideas on a fix?

count(Aggr(If(avg(RainfallValue)>0),[Alarm ID]))

 

Kind Regards

ND

Labels (2)
2 Replies
hic
Former Employee
Former Employee

Try

Sum(Aggr(If(Avg(RainfallValue)>0,1),[Alarm ID], Date))

This will count over all combinations of [Alarm ID] and Date, so you probably want either [Alarm ID] or Date as dimension.

ndeeleysww
Creator
Creator
Author

Brilliant - thank you!