Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Horizontal stacked bar chart with one dimension

Hi,


I have one dimension which is product type and I need to show the sum of each product type in a horizontal stacked bar chart with only one bar. Please see example below.

Untitled.png

Anyone could help with this?

thanks

1 Solution

Accepted Solutions
gladi-cz
Creator
Creator

In this case you have to modify your data in script.

This is my data definition:

//data definition

Data:

Load * Inline [

    ProductCategory, Qty

    A, 20

    B, 30

    C, 50

];


For your uses you have to create fictive group Product:

//data modification

DataModified:

NoConcatenate Load

'Product' as Product,

*

Resident Data;

Drop table Data;


After, you can create bar chart with two dimension ProductCategory and Product and also you can change type of chart to stack in presentation menu.


I added qvf.


Have a nice day,

Petr

View solution in original post

12 Replies
etrotter
Creator II
Creator II

Hi,

Add both dimensions by using the "add data" button. Have the one you want the whole bar defined by first, and add a measure such as quantity of the products. Next Click on "Appearance" and under presentation click on "stacked" and "horizontal". Next under "Colors and Legend"  under colors unswitch Auto and select by dimension. In the formula bar put the dimension you would like the bar to be separated by.

Anonymous
Not applicable
Author

HI

i am using qliksense desktop version,under presentation, i am not able to see 'stacked' option, where ca i find stacked option.

gladi-cz
Creator
Creator

Hi nagamani,

It's not so hard, could you share .qvf?

Petr

Anonymous
Not applicable
Author

hi,

i am not able to share qvf, can you please provide me scvreenshot as where i can select "Stacked" Option

gladi-cz
Creator
Creator

In this case you have to modify your data in script.

This is my data definition:

//data definition

Data:

Load * Inline [

    ProductCategory, Qty

    A, 20

    B, 30

    C, 50

];


For your uses you have to create fictive group Product:

//data modification

DataModified:

NoConcatenate Load

'Product' as Product,

*

Resident Data;

Drop table Data;


After, you can create bar chart with two dimension ProductCategory and Product and also you can change type of chart to stack in presentation menu.


I added qvf.


Have a nice day,

Petr

gladi-cz
Creator
Creator

I add result.

Screen.JPG

ramasaisaksoft

philgood34
Creator II
Creator II

Hi

here is the screenshot (sorry, it's french)

stacked.png

Regards

Philippe

ramasaisaksoft

I hope you already know for a stacked bar chart we need more than 1 Dimension and at least 1 expression required then only in Appearance -->Presentation-->Stacked will visible to you.