Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
benjamins
Partner - Creator
Partner - Creator

Frequency distribution in a stacked bar chart

Hey there,

I'm currently facing the following task:

I have a table with the following data:

Staffname, his/her department, the day he/she was in office.

So for 5 days a person was in office there would be 5 lines in my table (I numbered the days instead of putting actual date values for convenience).

Now I want to do a frequency distribution which tells me, how often there was a specific number of persons in office (stacked by department). This is correctly achieved by the left diagram in the attached sample.

Next I want to have another table that shows how much this is in percent. So the first bar should be 100% / 15 * 8 => 53%, so the displayed bars always sum up to 100%.

I can't seem to manage that as I have no idea how to disregard the dynamic dimension used for the frequency distribution. Any help greatly appreciated!

Cheers

1 Solution

Accepted Solutions
benjamins
Partner - Creator
Partner - Creator
Author

Sorry, my original sample was messed up.

I attached a new one to this post.

Now both charts seem correct.

A percentage value is usually calculated by dividing by the value of all bars stacked together (speaking visually). This however is quite complex in this case as this value is not determined trivially.

There also might be a more elegant way to put the expression. 

View solution in original post

1 Reply
benjamins
Partner - Creator
Partner - Creator
Author

Sorry, my original sample was messed up.

I attached a new one to this post.

Now both charts seem correct.

A percentage value is usually calculated by dividing by the value of all bars stacked together (speaking visually). This however is quite complex in this case as this value is not determined trivially.

There also might be a more elegant way to put the expression.