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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
AdrianS1
Contributor III
Contributor III

100% Stacked Bar Chart

Hi guys, i want to have 100% stacked chart like this:

AdrianS1_0-1683208032874.png

I Have flag column where values are  Flag_Delivery=1 which is Free delivery and 0 which is delivery and second column orders like this:

AdrianS1_1-1683208448254.png

 

How can i build this chart to compare count of  orders with delivery and without delivery ?

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@AdrianS1  Yes. you can. 

Add "=1" as Dimension.

Put below two measures. Label it as per your need
1) =Count({<Flag_Delivery={1}>} distinct Order)/ Count(total <YourDimension> {<Flag_Delivery={1,0}>} distinct Order)

2) =Count({<Flag_Delivery={0}>} distinct Order)/ Count(total <YourDimension> {<Flag_Delivery={1,0}>} distinct Order)

Go to Presentation and select Stacked option

Go to Apperance -> X-Axis -> Select Labels and Title as None

View solution in original post

4 Replies
Kushal_Chawda

@AdrianS1  Create a bar chart  and Follow below steps

1) Add Dimension

2)  Add below two measure and format it as %

1) =Count({<Flag_Delivery={1}>} distinct Order)/ Count(total <YourDimension> {<Flag_Delivery={1,0}>} distinct Order)

2) =Count({<Flag_Delivery={0}>} distinct Order)/ Count(total <YourDimension> {<Flag_Delivery={1,0}>} distinct Order)

 

3) Go to Presentation and select Stacked option

AdrianS1
Contributor III
Contributor III
Author

Hi Kushal, Can i have this Chart without Dimension ?

datagrrl
Creator III
Creator III

Maybe using ValueList? I attached an example. It isn't pretty. I used Kushal's expressions since he already wrote them.

 

I think I did them backwards but I was didn't have much time to devote to this and I thought I kind of knew the answer.

Kushal_Chawda

@AdrianS1  Yes. you can. 

Add "=1" as Dimension.

Put below two measures. Label it as per your need
1) =Count({<Flag_Delivery={1}>} distinct Order)/ Count(total <YourDimension> {<Flag_Delivery={1,0}>} distinct Order)

2) =Count({<Flag_Delivery={0}>} distinct Order)/ Count(total <YourDimension> {<Flag_Delivery={1,0}>} distinct Order)

Go to Presentation and select Stacked option

Go to Apperance -> X-Axis -> Select Labels and Title as None