Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael15
Contributor
Contributor

Question Balket Diagram "Count of Instances (How many employees have how many instances)"

Dear all 

I have an original data source in qlik with Employee ID's (in this view = Absence EmployeeID Period) and one or multiple #Instances column (all named with 1). First of all I have create a count(#instances) field to count instances of individual employees. In this case below the count(#instances) field = 2. Now I would like to create a balket diagram where I can see how many Employees have 0,1,2,3,4,5....Instances. Any tips for me how to achieve that?

Michael15_0-1710880168159.png

Michael15_1-1710880543318.png

 

Thanks for your help.

Labels (6)
7 Replies
Rohan
Specialist
Specialist

Hi Michael,

Have you tried something like :

Sum(aggr(count(#instances),employeeid))

This should give you Employee wise count of instances. which you can then bucket too like :

if(Aggr(sum(aggr(count(#instances),employeeid)),employeeid) >10,'>10',

if(Aggr(sum(aggr(count(#instances),employeeid)),employeeid) >5,'5-10','0-5')) as bucket

 

Regards,

Rohan.

Michael15
Contributor
Contributor
Author

Hi Rohan

Now I achieved this

First Column Employee ID and the category. I would like to see in first column Count of Employee ID and 2nd column Category.

Michael15_0-1710929939718.png

in this example it should look like this:

Count of Employees Category
8 >5

 

How to achieve and how to display in a balket diagram.

Rohan
Specialist
Specialist

Hi Michael,

Instead of employeeid, use count of EmployeeID with the bucketing expression.

 

Regards,

Rohan.

Michael15
Contributor
Contributor
Author

Hi Rohan

like this:

if(Aggr(sum(aggr(count([#Instances]),count of EmployeeID)),count of EmployeeID)>5,'>5',count([#Instances]))

Michael15
Contributor
Contributor
Author

Hi Rohan,

really appreciate if you could check and/or correct my last comment. Thank you so much.

Rohan
Specialist
Specialist

Hi Michael,

I meant in the table visualization where you have used EmployeeID as a dimension, Use Count of Employee ID instead.

 

Regards,

Rohan.

Michael15
Contributor
Contributor
Author

When I do that it looks really strange like this:

Michael15_1-1711354786467.png