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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart with two dimensions and two expressions

HI all

I am trying to create a chart that has on the x-axis hour of day. I then have two expressions, one: total activity (displaying this as a bar). Two: Average time from request to activity performed (displaying this as a line). This works fine.

What i would then like to do is:

- For the bar showing total activity, turn this into a stacked bar which shows the type of activity making up the total.


Any help would be much appreciated.

Kind regards,

Dan

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi Dan,

do you want something like this?

chart_example.png

I think you need an expression for each type of activity, like

Label = type A, expression =count (if (type='A', type))

Label = type B, expression =count(if (type='B', type))

etc.

Then use style subtype "stacked" and in Expressions display options "line" for the line chart (I also used a second y-axis) and "bar" for the two bar charts.

You probably tried using a second dimension, I think this is problematic because you don't want it to apply to the line chart (and this results in a non-stacked bar chart).

Regards,

Stefan

View solution in original post

2 Replies
swuehl
MVP
MVP

Hi Dan,

do you want something like this?

chart_example.png

I think you need an expression for each type of activity, like

Label = type A, expression =count (if (type='A', type))

Label = type B, expression =count(if (type='B', type))

etc.

Then use style subtype "stacked" and in Expressions display options "line" for the line chart (I also used a second y-axis) and "bar" for the two bar charts.

You probably tried using a second dimension, I think this is problematic because you don't want it to apply to the line chart (and this results in a non-stacked bar chart).

Regards,

Stefan

Not applicable
Author

thanks for you help,

dan