Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Taka4
New Contributor II

How to create a bar chart with two dimensions (one with multiple and another with two variables)

I am new to Qlik sense and trying to learn. I am trying to create a bar chart that has two dimensions (one dimension with several variables and another with two variables.)  My dataset and the image of my intended bar chart are shown below. What should I set for the dimensions and measure? Should I revise my dataset?

S__14180355.jpgScreen Shot 2019-03-03 at 3.20.40 PM.png

Labels (2)
2 Solutions

Accepted Solutions
rogerpegler
Contributor

Re: How to create a bar chart with two dimensions (one with multiple and another with two variables)

I'm assuming each row in your data set represents a single case or scenario and the  bars in the bar chart reflect the number of cases/scenarios.

(Using CrossTable load) Convert the data into a format like:

Case / Goal / Priority
1 / Saving Money / Second
1 / Finding Job / Top
1 / Taking Care of Children / Top
2 / Finding Job / Second
etc

Dimensions : Goal & Priority
Measure: count(Case)

 

rogerpegler
Contributor

Re: How to create a bar chart with two dimensions (one with multiple and another with two variables)

For the attached XL, the load script is:

CrossTable(Goal, Priority)
LOAD Case,
[Save Money],
[Finding Job],
Education,
Children
FROM
[H:\Documents\Priorities.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

(I used QlikView which has a wizard to build it for you!)

4 Replies
rogerpegler
Contributor

Re: How to create a bar chart with two dimensions (one with multiple and another with two variables)

I'm assuming each row in your data set represents a single case or scenario and the  bars in the bar chart reflect the number of cases/scenarios.

(Using CrossTable load) Convert the data into a format like:

Case / Goal / Priority
1 / Saving Money / Second
1 / Finding Job / Top
1 / Taking Care of Children / Top
2 / Finding Job / Second
etc

Dimensions : Goal & Priority
Measure: count(Case)

 

Taka4
New Contributor II

Re: How to create a bar chart with two dimensions (one with multiple and another with two variables)

Thank you so much for your solution. Yes, each row represents answers of each participants. Could you also tell me how to use CrossTable load on Qlik sense? I am confused about how to use "crosstable" syntax to convert the data.... Thanks!
rogerpegler
Contributor

Re: How to create a bar chart with two dimensions (one with multiple and another with two variables)

For the attached XL, the load script is:

CrossTable(Goal, Priority)
LOAD Case,
[Save Money],
[Finding Job],
Education,
Children
FROM
[H:\Documents\Priorities.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

(I used QlikView which has a wizard to build it for you!)

Taka4
New Contributor II

Re: How to create a bar chart with two dimensions (one with multiple and another with two variables)

That worked!!! Thank you so much for your suggestion!