Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic Min scale across multiple charts

Hi,

I want to show three bar charts, with month as the dimension, and with each chart showing it's own percentage expression (related to stock fullfulment).

To avoid the need for wasted vertical space I don't want the scale of these charts to range form 0 to 100%, but instead to range from the lowest value (for a monthly column, across all three charts - i.e. the lowest of the 36 values) up to 100%.

I am trying to calculate this in a variable, which I can then use in a dynamic expression for the min scale.

Within each chart I can use Rank(sum(expression)) to find out which months are the highest and lowest. However, I need to be outside of the charts in a variable.

I can also calculate the average of each chart, using aggr(nodistinct sum(expression), Month). However, I'm not interested in the average but in the lowest value.

I have tried combinations of min(aggr(sum(expression), Month)) but am getting blanks.

Any ideas would be much appreciate.

Jonathan

2 Replies
Not applicable
Author

did you try rank()  function?

try to post a sample qvw file

Anonymous
Not applicable
Author

Hi Pari,

I tried the Rank(sum(expression)), which allowed me to find out which months are the highest and lowest. However, As I had to be outside of the charts (in a variable), I don't think I could use it to tell me which month is the lowest in all the charts.

While creating the attached sample I found that the min(aggr(Expression),Month) does actually work. I suspect I was having problems because I do a division to get the percentage I am calculating.

Thanks,

Jonathan