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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help plotting bar chart when an item is appears in two bars

Hi I'm new to QlickView and was looking for some help.

I have two columns of data, black_or_white and cat_or_dog.

Header 1Header 2Header 3
Animal_IDblack_or_whitecat_or_dog
Animal_1blackdog
Animal_2whitedog
Animal_3blackcat

On the same bar chart id like to plot a bar for the amount of dogs, a bar for the amount of black dogs, a bar for the amount of cats, and a bar for the amount of black cats.

I have managed to plot the amount of cats v dogs by having animals at the dimension and count(animals) as the expression. I have also managed to plot amount of white dogs, amount of black dogs, amount of white cats, amount of black cats using:

if(cat_or_dog = cat, if(black_or_white = white, 'white cat', 'black cat'), if(black_or_white = white, 'white dog', 'black dog') as the dimension.

But neither of these things is what i want. i want a bar for amount of dogs, and a bar for amount of black dogs....

Thanks very much

11 Replies
Not applicable
Author

Sorry i didn't see your second comment. that second expression worked. thank you so much!

MK_QSL
MVP
MVP

Please close the thread by selecting correct answer...