Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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

1 Solution

Accepted Solutions
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())

View solution in original post

12 Replies
Anil_Babu_Samineni

Yes, We have the power of that? Can you share the data set please?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
prma7799
Master III
Master III

Hi Balu,

Please share some sample data .

Thanks

PM

Not applicable
Author

I have attached the excel sheet.

Blue is the sum of Red+Orange +Grey.

PS: I cannot open QlikView documents as I run the personal edition.

Thanks

Not applicable
Author

Hi,

I ve attached the datasheet in my previous reply.

Not applicable
Author

sorry I messed up: Blue= Red+Green+Yellow

sunny_talwar

May be this

Capture.PNG

Not applicable
Author

Hey,

Exactly, but how ? Can you please brief here I cannot open Qlikview document as I am running the personal edition.

prma7799
Master III
Master III

As Sunny Bhai suggested...

PFA

In chart

Dimension

1.Dim

2.=Pick(Dim, Color, 'Blue')

Expression

=Sum(Value)

Not applicable
Author

Hey ,

Still, it isn't stacked.