Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how do I build a stacked bar chart

I can build a stacked bar chart - but it always displays the wrong data - so I am missing something.

I have:

Choices - 1,2,3,4,5,6,7,8,9 (dimensions)

FirstChoice - 1,1,1,2,5 (Measure)

SecondChoice - 1,2,2,4,3 (Measure)

I want the stacked bars to show how a count of how many times each number is chosen as first and second choice.

First and second choices should be stacked on top of each other for a given choice value.

I have defined the measures as:

Count(FirstChoice) and Count(SecondChoice)

What happens is that the chart shows 9 bars (labelled 1-9) - with the two stacked blocks having a value of 3 in the first bar. ie 3 + 3 for choice value '1'.

This is wrong.

It should be 3 + 1 for dimension value 1.

It seems that every bar is showing the same value from FirstChoice - twice.

What am I missing?

7 Replies
Anonymous
Not applicable
Author

It seems your data is not loaded in the correct form. Could you show us the load script for the data?

Not applicable
Author

I am really at the beginning here - lots of DB experience but no Qlik experience. How to I get the load script - is that what is auto generated in the data load editor?

deepali_more
Creator
Creator

can u paste ur qvf file here..may be i can help u seeing the file...Or u check with the data ..it has very lil difference n that d reason u might think it is repeating values.

Not applicable
Author

heres the qvf.

I have made two bar graphs from the data. The first one has one dimension and one measure  - and shows the correct values.

The second one has one dimension and three measures stacked - but each measure is the same value repeated...rather than the correct count of values from the data file.

I know I am missing something obvious in the data schema but Ic ant work it out.

Thanks for taking a look.

deepali_more
Creator
Creator

Add noconcatenate to data load...and see if it is wokring..Just a sggestion no idea if it will work

beck_bakytbek
Master
Master

Hi Al,

check this: QlikView | Stacked Bar Chart - YouTube

i hope that helps

beck

jayaseelan
Creator III
Creator III

Hi,

  Use value list in your dimension and write if condition using value list in measurement. i hope you will get your output.

thanks.