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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
NickHoff
Specialist
Specialist

Default Static Max

How is the default static max of a chart calculated?  I'm attempting to do a conditional on the static max, I have my conditional working but i'm unable to get the default max the chart displays based on the current expression.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you set the Static Max to null, QV will use it's own default. So use an if() and omit the 3rd parameter.

=if(my test condition, myscale)

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

9 Replies
sunny_talwar

Not sure what you mean by default static max? Can you elaborate a little?

NickHoff
Specialist
Specialist
Author

When I plug in the following expression, the chart sizes based on the current set of data in that expression.

=NUM(SUM({$<CalendarYear =, CalendarMonthName =, Program -= {'Prevention'},AddedOn={">=$(=addmonths(max(Today()),-12))  <=$(=monthend(max(Today()),-1))"}>}CardiologistscheduledNN),'##')

What I want is the chart to scale differently using static max in the if a condition is met which I can get to work, but if that condition is not met I want the chart to size to the default state.  However, I can't get the default state without knowing how Qlikview calculates the scale of a chart.

sunny_talwar

What if you create two charts and make them conditionally hide and show them?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you set the Static Max to null, QV will use it's own default. So use an if() and omit the 3rd parameter.

=if(my test condition, myscale)

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

NickHoff
Specialist
Specialist
Author

That won't work for what i'm doing sunny.  I'm doing the above to always show a reference line on a chart if it's outside of the data range.  If I correct the ones the reference line doesn't display correctly on, then the scale from the current data is thrown off.

sunny_talwar

Did not know that

Thanks for the information Rob

NickHoff
Specialist
Specialist
Author

Thank you Rob that helped me out tremendously, great to know.

Not applicable

Do uhave a sample app for this

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here is a sample app. I'm not sure what the real use case may be, but this app demonstrates the conditional setting of Static Max.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com