Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
7mon
Contributor II
Contributor II

Combo chart: same dynamic scale for both KPI's

Hi,

I'd like to display multiple KPI's in a combo chart, using the same dynamic scale.

Dependent on which KPI's has the highes value, the two scales should display the same maximum value.

We have unsucessfully tested the following statement in the max range:

if ( max(KPI_1) > max(KPI_2), max(KPI_1), max(KPI_2) )

 

Here we tried to enter the minimum and maximum scale for the KPI:

7mon_0-1678367318808.png

 

Many thanks for your support

Simon

 

 

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

You would need to use aggr() for this, since at the object level, e.g.

=RangeMax(Max(Aggr(KPI1,DimensionField)),Max(Aggr(KPI2,DimensionField)))

But that aside, why not just use a dynamic maximum if you're looking for it to match the highest value existing in the data?

 

View solution in original post

3 Replies
Or
MVP
MVP

You would need to use aggr() for this, since at the object level, e.g.

=RangeMax(Max(Aggr(KPI1,DimensionField)),Max(Aggr(KPI2,DimensionField)))

But that aside, why not just use a dynamic maximum if you're looking for it to match the highest value existing in the data?

 

7mon
Contributor II
Contributor II
Author

Hi Or,

many thanks for your quick reply.

So using RangeMax(Max(Aggr(...))) is used to define a dynamic maximum right..

It's working out properly btw 🙂

Thanks from Austria

Simon

Or
MVP
MVP

RangeMax() is just a cleaner (and quicker) way to write this out rather than using If(Expr1>Expr2,Expr1,Expr2), since you don't have to write each expression out twice.