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: 
Not applicable

Stacked and Grouped in a single bar chart?

Hello,

Can we present one expression as a single bar and two other expressions as stacked in a single chart?

Something like this.

Combo.png

12 Replies
sunny_talwar

Script

Table:

CrossTable(Color, Value)

LOAD * INLINE [

    Name_State, Red, Green, Yellow

    Region 1, 1999, 4068, 1933

    Region 2, 14148, 11063, 0

    Region 3, 574, 4335, 3091

    Region 4, 14506, 2368, 1126

    Region 5, 11809, 22999, 12192

    Region 6, 571, 4586, 3843

    Region 7, 11430, 4922, 20648

    Region 8, 9418, 25718, 0

    Region 9, 2092, 6038, 5870

    Region 10, 6689, 22687, 71624

    Region 11, 12590, 41490, 6920

    Region 12, 9336, 48555, 51109

    Region 13, 19740, 17647, 3613

];

Dim:

LOAD * Inline [

Dim

1

2

];

Dimension

Dim

=Pick(Dim, Color, 'Blue')

Expression

=Sum(Value)

Background Color expression

=If(Dim = 1, If(Color = 'Yellow', Yellow(), If(Color = 'Red', LightRed(), If(Color = 'Green', LightGreen(), LightBlue()))), LightBlue())

Not applicable
Author

Thank you all for your timely help. You guys are great.

See you soon with another question

Not applicable
Author

Hey,

Thanks much.