Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying Min & Max with a Reference Line

Hi there,
I am trying to add 2 references lines to a chart which displays a count overtime. I would like to add the Max and Min values of the current selection with reference lines. In the expression I have RangeMin($) and RangeMax($). I assumed the $ would be the current selected data but it displays 0. I have tried RangeMax(count(varname)) which is used for the main graph but this does not display anything.

I can't find any obvious help in the reference manual. Any help would be greatly appreciated.

Thanks

Andrew

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Here's a working example of what I think you're asking for.

View solution in original post

7 Replies
johnw
Champion III
Champion III

I believe you want this:

min(aggr(your overtime expression,your first dimension,your second dimensions,...))
max(aggr(your overtime expression,your first dimension,your second dimensions,...))

For example, if your expression is sum(Quantity), and your chart dimensions are Year and Customer:

min(aggr(sum(Quantity),Year,Customer))
max(aggr(sum(Quantity),Year,Customer))

Not applicable
Author

Hi John,

Thanks for replying.

I am using a Group Drill Down for the other dimension.

=Date(MakeDate(EventYear),'YYYY')
=Date(MakeDate(EventYear,EventMonth),'MMM')
=Date(MakeDate(EventYear,EventMonth,EventDay),'dd')
=Time(MakeTime(EventHour),'HH')
=Time(MakeTime(EventHour,EventMinute),'mm')

What would I enter for the Drill Down Dimension?

Thanks

johnw
Champion III
Champion III

Well, I don't think I've done it with a drill down group before. My GUESS is that you'd enter the name of the drill down group. So if the drill down group is named "Date and Time Group", I'm guessing:

min(aggr(count(varname),"Date and Time Group"))

Not applicable
Author

Hi John,

That doesn't appear to work.

Here what I entered. Where Tag_Count_Drill_Down is my Group.

min(aggr(Count(Tag),"Tag_Count_Drill_Down"))

johnw
Champion III
Champion III

Here's a working example of what I think you're asking for.

Not applicable
Author

Hi John,
It's the expression I had in the group. Works fine with EventYear........

Thanks for the excellent support.

Cheers
Andrew

ob
Partner - Contributor II
Partner - Contributor II

This was a great help for me! I struggled to find the maximum value in a line chart to be able to decide the Y-axis value when using a Reference line. Thanks! Big Smile