Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
vsabbise
Creator
Creator

Bar chart with 2 dimensions

How do I develop a bar chart with 2 dimensions. I can easily do this in excel but couldn't do in Qlik sense. Could someone help.

uid dim1 dim2
1 yes no
2 yes yes
3 no no
4 no yes
5 yes no
9 no no

output:

11-14-2019 5-03-53 PM.png

Labels (1)
4 Replies
Oleg_Troyansky

I'm not sure I understand the challenge...

1. Add a Bar chart to the sheet

2. Add Dim 1

3. Add Dim 2 - in the Properties panel on the right, under "Data"

4. Add the measure. I'd think that you need a count(uid), but if you really need a sum, then so be it...

5. Under Presentation properties, decide if you want a Grouped or a Stacked Bar chart 

6. Add any other bells and whistles...

Cheers,

Oleg Troyansky

Check out my book QlikView Your Business - an Expert Guide to QlikView and Qlik Sense

 

Anil_Babu_Samineni

I agree with @Oleg_Troyansky . You can even think another approach which says "Alternative Dimension"

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vsabbise
Creator
Creator
Author

Yes this was my first bet but unfortunately this isn't working and it is grouping dim1 initially and then dim2 but not both. please find the screen shot.

 

11-15-2019 9-17-48 AM.png

cpomeren003
Partner
Partner

I think you can solve this by changing the way you load your data.

So instead of:

uid, dim1, dim2
1, yes, no
2, yes, yes
3, no, no
4, no, yes
5, yes, no
9, no, no

You load your data like this:

uid, dim, value
1, dim1, yes
2, dim1, yes
3, dim1, no
4, dim1, no
5, dim1, yes
9, dim1, no
1, dim2, no
2, dim2, yes
3, dim2, no
4, dim2, yes
5, dim2, no
9, dim2, no

This way you can use "value" and " dim" as dimension and "uid" as measure. This should result in your desired chart.

I have attached an example.

Hope this helps!