Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ndeeleysww
Creator
Creator

Count if...

Hello,

I'm successfully counting the number of alarms using set analysis to create a line chart:

Count({$<Date={'>=$(=Date($(vTodaysDate)))'}, alarm_status={3}>} AlarmCount)

My line chart has a fixed reference line showing all the alarms that are higher than a burst point of 12:

Image1.png

My manager now wants a count of where the alarms for a given date are above 12. I think I should be able to do this with a count if, but i can't get it to work:

count(if(Count({$<Date={'>=$(=Date($(vTodaysDate)))'}, alarm_status={3}, DataSource={'Alarms'}>} AlarmCount) >12, AlarmCount)

Any ideas on the syntax I should be using?

Cheers

Neil

10 Replies
ndeeleysww
Creator
Creator
Author

Cheers Gysbert, this seems to work - I'm just checking it out fully but it all looks good:

sum(aggr(if(

Count({$<Date={'>=$(=Date($(vTodaysDate)))'}, alarm_status={3}>} AlarmCount)>12, Count({$<Date={'>=$(=Date($(vTodaysDate)))'}, alarm_status={3}>} AlarmCount)

),Date, TenMinInterval))

Thanks very much for all your help!