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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
peschu123
Partner - Creator III
Partner - Creator III

Maximum value for Y-axis

Hi community,

I use the following expression in my chart:

Delivery_relevant_date - only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang])

Now I would like to set the maximum to 500. But if max value is for example is only 100 it should scale to 100.

I tried several possibilities in the chart properties for static max...but I don't get it to work

I appreciate any help.

Best Regards,

Peter

6 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

In chart properties -> Axes -> Scale-> Static Max

Give your expression - Max(MeasureName)

Regards,

jagan.

peschu123
Partner - Creator III
Partner - Creator III
Author

Hi jagan,

thank you for your reply.

I dont get what you mean with Max(MeasureName) ?

I want something like the following

IF Delivery_relevant_date - only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang])) > 500 than 500 else

Delivery_relevant_date - only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang])



jagan
Partner - Champion III
Partner - Champion III

Hi,

Give this expression in

In chart properties -> Axes -> Scale-> Static Max

If(only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang]) > 500,  500,

only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang]))


Regards,

Jagan.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Typically you will need an Aggr statement for doing this. To build on Jagan's expression:

=If(max(aggr(Delivery_relevant_date - only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang]), [Your Dimensions])) > 500,  500,

max(aggr(Delivery_relevant_date - only({<[Bezeichnung DLZ]={'Assessment'}>}[Start Vorgang]), [Your Dimensions])) * 1.1)

The multiply by 1.1 is to allow a bit of space above the max point - or it can look like the line is off the top of the scale.  You can adjust that number to suit.

If you search for AGGR you will find lots of information on the Community and elsewhere on line.

Hope that helps,

Steve

peschu123
Partner - Creator III
Partner - Creator III
Author

Sorry this didn't work,

I calculate the difference between 2 dates, so the formula gives as result number of days for each order.

X-Axis = Orders

And in my chart I have 2-3 exceptions which have 1000 days as result, which destroys my axis scale...community_chart.JPG.jpg

Or in other Words, I want to ignore values higher than 500 for scaling my chart...

ThornOfCrowns
Specialist II
Specialist II

You will always hit that problem if your average data is < 50 with a few outliers of 1000, i.e. 20 times greater. You could use a log scale, but you'd have to be clear in showing that you're doing so.