Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
craigbence
Contributor III
Contributor III

Comparing Hire Date Year/Month against Termination Date Year/Month - Bar Chart

We need to chart a count of how many employees were hired in any given year/Month side-by-side with a count of how many employees were terminated the same year/month. We have a [Hire-Year-Month] field and a [Termination-Year-Month] field.

Having a brain freeze on how to create a Bar Chart to present this information. Any help would be greatly appreciated.

Labels (1)
  • SaaS

2 Solutions

Accepted Solutions
Kushal_Chawda

Dimension:

[Hire-Year-Month] 

Expressions:

1) Count(distinct EmployeeKey) ->  No of employee hired

2) Count(distinct {< [Terminate-Month-Year]=p({1}[Hire-Year-Month])>}EmployeeKey) -> No of employees Terminated

View solution in original post

craigbence
Contributor III
Contributor III
Author

This did work!!! Thank you.

 

Count(distinct {< [Termination Date.ac.MonthYear]=p({1}[Hire Date.ac.YearMonth])>}EmployeeKey)

View solution in original post

7 Replies
Kushal_Chawda

Is there any Flag to identify that employee is terminated ?

craigbence
Contributor III
Contributor III
Author

Just the Termination Date <> ' '

Kushal_Chawda

Create bar chart 

Dimension:

[Hire-Year-Month] 

Expressions:

1) Count(distinct EmpID) ->  No of employee hired

2) Count(distinct {< [Terminate-Month-Year]=p({1}[Hire-Year-Month])}>}EmpID) -> No of employees Terminated

craigbence
Contributor III
Contributor III
Author

We really appreciate your help on this. Our code we created is displayed below. The first measure/expression appears to work fine. However, the second measure/expression is generating the following error:

Error in expression

Error in set modifier expression.

 

First measure (syntax ok):

          Count(distinct EmployeeKey)

 

Second Measure :

Count(distinct {< [Termination Date.ac.YearMonth]=p({1}[Hire Date.ac.YearMonth])}>}Employeekey)

Thoughts??

craigbence
Contributor III
Contributor III
Author

We are still unable to get this solution to work. Any additional help we can get from our last post on the syntax error would be greatly appreciated!!

Thanks.

Kushal_Chawda

Dimension:

[Hire-Year-Month] 

Expressions:

1) Count(distinct EmployeeKey) ->  No of employee hired

2) Count(distinct {< [Terminate-Month-Year]=p({1}[Hire-Year-Month])>}EmployeeKey) -> No of employees Terminated

craigbence
Contributor III
Contributor III
Author

This did work!!! Thank you.

 

Count(distinct {< [Termination Date.ac.MonthYear]=p({1}[Hire Date.ac.YearMonth])>}EmployeeKey)