Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ndeeleysww
Creator
Creator

max count as a reference line

Hi,

I'm trying to add the max count of alarms over 10 mins intervals as a reference line for a line chart. My user just wants to show the highest value on a chart whatever the selection.

My chart has the count of alarms by Ten minute interval and Date

I'm using the expression max(aggr(count({<DataSource={'Alarms'}>} AlarmCount), TenMinInterval)).

This works if I select an individual day from my date range:

img1.png

However, if I select more than one day the highest value is no longer shown:

35082668875b4752b7910c175b382cbf.png

The value 249 should be the highest value in the chart, but instead its 312.

Any idea what i am doing wrong?

Cheers

Neil

1 Solution

Accepted Solutions
sunny_talwar

Or may be this:

=Max(TOTAL Aggr(Count({<DataSource={'Alarms'}>} AlarmCount), TenMinInterval, DateField))

View solution in original post

7 Replies
MK_QSL
MVP
MVP

May be

max(TOTAL aggr(count({<DataSource={'Alarms'}>} AlarmCount), TenMinInterval))

ndeeleysww
Creator
Creator
Author

Hi Manish,

I’ve tried that, but it makes no difference to the value I’m afraid.

Neil

MK_QSL
MVP
MVP

Try

max(TOTAL {<DataSource={'Alarms'}>} aggr(count({<DataSource={'Alarms'}>} AlarmCount), TenMinInterval))

or

max({<DataSource={'Alarms'}>} aggr(count({<DataSource={'Alarms'}>} AlarmCount), TenMinInterval))

sunny_talwar

Or may be this:

=Max(TOTAL Aggr(Count({<DataSource={'Alarms'}>} AlarmCount), TenMinInterval, DateField))

ndeeleysww
Creator
Creator
Author

That’s it! Thanks Sunny!

ndeeleysww
Creator
Creator
Author

Hi Manish,

Both give the same result, but thank you for your help! Like Sunny suggested, I needed to put in the extra Date field to calculate the max total value.

Cheers

Neil

sunny_talwar

Awesome, I am glad it worked. Please close the thread if you got what you were looking for by marking the correct and helpful answers.

Best,

Sunny