Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Evening all
I would appreciate some assistance with drawing a bar graph with a bit of a difference. Our customer fill in a questionnaire where there are some questions asking for a Yes/No response around their health status. There a question that asks if they have diabetes, another that asks if they have hypertension, another one that asks if they have high cholesterol, etc. I want to represent this in a bar graph where each bar on the graph will be for each question that was answered. The bar will simply show the percentage of customers that answered Yes for that question. In this example I will have a bar graph with 3 bars, one for diabetes, then next for hypertension and the last for high cholesterol. Each bar will show the percentage of customers that answered Yes to that question.
The input data would look like this (I have excluded the other fields that are not relevant to this question)
Customer No | Diabetes | Hypertension | High Cholesterol |
---|---|---|---|
1 | Yes | No | Yes |
2 | No | Yes | Yes |
3 | No | No | Yes |
4 | No | Yes | No |
5 | Yes | Yes | No |
6 | No | Yes | No |
The bar graph's 3 bars would have the values, Diabetes:33.3%, Hypertension:66.7% and Cholesterol:50.0%
You suggestions will be most welcome.
Braham Edwards
Create a bar chart with no dimension and three expressions
1) Count({<Diabetes = {'Yes'}>}Diabetes)/Count(Diabetes)
2) Count({<Hypertension = {'Yes'}>}Hypertension)/Count(Hypertension)
Count({<[High Cholesterol] = {'Yes'}>}[High Cholesterol])/Count([High Cholesterol])
Create a bar chart with no dimension and three expressions
1) Count({<Diabetes = {'Yes'}>}Diabetes)/Count(Diabetes)
2) Count({<Hypertension = {'Yes'}>}Hypertension)/Count(Hypertension)
Count({<[High Cholesterol] = {'Yes'}>}[High Cholesterol])/Count([High Cholesterol])
Thanks Sunny, I did not know you could draw a bar chart without any dimension.
Works fine.
Regards
Braham
In QlikView, you can.... but not so sure about Qlik Sense