Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
odassier
Creator II
Creator II

Combo Chart - set zero value on both axis at same level

Hello all,

I am using a combo chart in Qlik Sense 3.1 where the two measures are quite different in scale and so I am using two Y-axis, however, I would like for the zero value on both axis to be at the same level (my data can have both positive and negative values for either measures so the Zero cannot be the minimum range value in settings).  I'm dealing with Risk data so although Volatility measures are never negative, Correlations ones often can be.  Right now I am doing this manually but each time I refresh the data, I need to adjust the second Y-axis.  Is there a way to set both to Y-axis to dynamically scale with each other so as to maintain the same level zero value?

Thanks,

Olivier

1 Solution

Accepted Solutions
tomasz_tru
Specialist
Specialist

OK, I set minimum and maximum on both axis, so both of them are the same. It's possible to divide or multiply formula for one of the axis by a factor and zero level will be still the same.

=RangeMin(Min([measure1]), Min([measure2]))

=RangeMax(Max([measure1]), Max([measure2]))

View solution in original post

11 Replies
shraddha_g
Partner - Master III
Partner - Master III

In Appearance -> Y Axis did you try setting Range Min as 0 instead of Auto?

odassier
Creator II
Creator II
Author

Hi Shraddha,

Yes, but the issue is that one measure has negative values, the other not, so if I set the Y-axis with only positive values to Min 0, and the other Y-Axis has Min -5, then they will not be aligned.  Right now I am scaling the Min-Max range of the second Y axis to be a function of the first one (i.e. X10 if the scales are that different), but this scalar needs to be adjusted each time I refresh the data as the values on the first Y-Axis will change through time.

Olivier

tomasz_tru
Specialist
Specialist

Hi Olivier,

any news on that? I've got the same problem.

alextimofeyev
Partner - Creator II
Partner - Creator II

You can use a formula for Min and/or Max values to set them dynamically.

odassier
Creator II
Creator II
Author

Hi Alex,

That's what I am doing now, but you have to figure out the formula each time you select a different data set in the filters, so I was hoping for a chart setting solution so that I would not have to fiddle with the formula each time.

At this point, I do not believe the native chart object has a solution for this and I'm searching through the extension landscape for one that does.  No success so far.

Olivier

odassier
Creator II
Creator II
Author

Hi Tomasz,

Unfortunately, none so far. I use a formula each time, but this is not the solution I was hoping for.

Olivier

alextimofeyev
Partner - Creator II
Partner - Creator II

Olivier,

can you explain why is it impossible to have a formula that would be fully automatic? Maybe give a simple scenario of the kind of selections you make in two cases, when you have to change the formula for min value manually?

odassier
Creator II
Creator II
Author

Hi Alex,

Good question, you forced me to rethink about that.  So say I have standard Deviation values (which are always positive and between '0' and '1') on the left Y axis, and I want to plot correlation data on the right axis (which are between -1 and +1 and sometimes can be all positive or all negative).

I guess I could use some sort of formula multiplying the max absolute value by some constant and use that in the range limits?

Olivier

tomasz_tru
Specialist
Specialist

OK, I set minimum and maximum on both axis, so both of them are the same. It's possible to divide or multiply formula for one of the axis by a factor and zero level will be still the same.

=RangeMin(Min([measure1]), Min([measure2]))

=RangeMax(Max([measure1]), Max([measure2]))