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: 
brentdga
Contributor II
Contributor II

Two bar chart dimensions on the same axis

I've been trying and struggling for several days now on creating what is probably a fairly simple visualization. I'm trying to show a stacked count by region or business unit, side-by-side.

I have two stacked bar charts with fairly complex expressions that use several set analysis modifiers. One chart is based on the Region Dimension, and the other chart is on the Business Unit dimension.

My first approach was to create two separate charts; however I've had a lot of issues getting the scales to match. I've tried the maxvalue/aggr functions; however I think my chart expressions are two complex to fit in.

I'm now wondering if it is possible this in a single chart so I can use dynamic axis heights?

 

I'm posting an example of what I'm trying to accomplish (where the scale is identical from chart to chart).

brentdga_0-1603832145657.png

It would of course be very easy if I just did a trellis; but I don't have the real estate.

 

I'd greatly appreciate any help / suggestions!

1 Solution

Accepted Solutions
rubenmarin

Hi, I think you can use RangeMax() with 2 expressisons: one with aggr by Region and another by businesUnit, with the max value you can add a multiplier (1.1) to set as axis max value.

The expression for axis can be something like:

RangeMax(Max(Aggr(Expression, Region)),Max(Aggr(Expression, BU)))*1.1

View solution in original post

2 Replies
rubenmarin

Hi, I think you can use RangeMax() with 2 expressisons: one with aggr by Region and another by businesUnit, with the max value you can add a multiplier (1.1) to set as axis max value.

The expression for axis can be something like:

RangeMax(Max(Aggr(Expression, Region)),Max(Aggr(Expression, BU)))*1.1

brentdga
Contributor II
Contributor II
Author

Thank you!!! I tried that earlier but must have had an issue with my parentheses. I just started and wrote the expressions from scratch filling them into your expression and it's working perfectly!