Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am having trouble trying to make a stacked bar chart with two dimensions and 1 measure. Any help is appreciated - thank you. I have added the sample data.
This is the sample chart that I want to replicate in Qlik sense:
Hi !
Here is the solution for you.
I hope it help's you !
Waiting your feedback, good luck.
Hi !
Here is the solution for you.
I hope it help's you !
Waiting your feedback, good luck.
wow super, thank you!
2 questions related:
(1) How can I exclude specific variables, for example, I would like to exclude class 'c' or product 'apples' from the chart?
(2) How I can change the chart to 100% stacked bar chart. For example, I want to sum each 'product' in each 'class' and 'year' as a percentage of the in total in the 'class' and 'year'
Hi, I'm happy to help you.
Here is the .qvf with your two questions, please if my answer resolved your question, don't forget to mark as "Correct Answer".
Look that I've created two metrics.
Hi Pablo,
I added example.qvf but I cannot find the answers to my two questions.
Can you help me find them please?
(1) How can I exclude specific variables, for example, I would like to exclude class 'c' or product 'apples' from the chart?
=if(product <> 'apple',product)
(2) How I can change the chart to 100% stacked bar chart. For example, I want to sum each 'product' in each 'class' and 'year' as a percentage of the in total in the 'class' and 'year'
tab1:
LOAD
product,
"class",
weight,
"year",
class&'-'&year as ClassYear
FROM [lib://doc/sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
diments = ClassYear, product
Expresion = sum(weight)/sum(total ClassYear weight)
Hi,
Sorry, my fault !
Here the correct .qvf
thank you very much!
Q1: Works really well. Any idea how to sort from largest to smallest i.e. largest stacks are on the bottom?
Q2: I need a 100% stacked bar for each class and year. Can you help me again please?
(1) How can I exclude multiple objects such as 'apple' in Product and 'c' in Class in one single expression?
(2) I will try this
2) did not work. No bars appeared at all, the chart is completely blank