Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
deniscamh
Creator
Creator

Percentage display on a Stacked Bar Chart

Hello All,

Here is my issue:

I am trying to create a stacked bar chart that represents number of employees by Age group for different departments.

So I managed to do that with the following formula for meassure:

count({<[Employee Current Status Short Descrip] = {'Active','On Leave'}>} distinct EMPLOYEE)

And Dimension 1 is Department and Dimension 2 is Class(Current Age,10).

Now it works and it shows number of employees for each Age Group by department.

But what I have a request for is to represent relative % values for each Age Group by department.

So I tried something like this 

count({<[Employee Current Status Short Descrip] = {'Active','On Leave'}>} distinct EMPLOYEE)

/

count({<[Employee Current Status Short Descrip] = {'Active','On Leave'}>} total <Department> distinct EMPLOYEE)

but it does not work because one employee can be in different Age group as my data is for multiple years and by using distinct function my total is less that it suppose to be.

For Example for department 1 I have  3 employee in 20<=yr<30; 5 employee in 30<=yr<40, 10 employee 40<=yr<50. So obviously my total should be 18 bu because I have two employees that moved from one group to another during the period my total is 16 and it gives wrong results.

Does anyone has any idea how I can solve this?

Thanks

10 Replies
deniscamh
Creator
Creator
Author

Sure if they would insist to have the option will try your solution.

For now I would give it them as hard coded and see what the say.

Thank you for trying to help!