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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Lin Chart X-Axis

Hi,

I have chart that plots two expressions :

Line A : sum({<[Indicator Number]={80}, [Sub Indicator]={'ABC'},[rolling_12_month_flag]={1}> }Number)

Line B : sum({<[Indicator Number]={80}, [Sub Indicator]={'XYZ'},[rolling_12_month_flag]={1}> }Number)

Is there anyway to set the minimum x-axis values to whatever the lowest value of these two expressions is minus 250?

Many thanks,

Tom

Labels (1)
2 Replies
Nicole-Smith
MVP
MVP

In the Static Min expression box (on the Axes tab):

=rangemin(min(aggr(sum({<[Indicator Number]={80}, [Sub Indicator]={'ABC'},[rolling_12_month_flag]={1}> }Number), YourFirstDimension, YourSecondDimension, etc.)), min(aggr(sum({<[Indicator Number]={80}, [Sub Indicator]={'XYZ'},[rolling_12_month_flag]={1}> }Number), YourFirstDimension, YourSecondDimension, etc.)))-250

You need the aggr() to get the calculation with your dimensions.  Listing them in rangemin() will give the min of the mins.  Then just subtract 250.

MK_QSL
MVP
MVP

Right Click

Axes

Scale

Tick Min and under Static Min Copy below expression.

IF(sum({<[Indicator Number]={80}, [Sub Indicator]={'ABC'},[rolling_12_month_flag]={1}> }Number))

<

sum({<[Indicator Number]={80}, [Sub Indicator]={'XYZ'},[rolling_12_month_flag]={1}> }Number),

sum({<[Indicator Number]={80}, [Sub Indicator]={'ABC'},[rolling_12_month_flag]={1}> }Number))-250,

sum({<[Indicator Number]={80}, [Sub Indicator]={'XYZ'},[rolling_12_month_flag]={1}> }Number)-250)