Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current year count vs Previous year count

I have these fields in my database, PayRollYear and PayRollMonth and EMPNO.

I want to create a combo chart, that shows the count of employees in the present year vs the previous year. Present year would be a bar chart, and previous year would be a line chart, month being the dimension. Any ideas????

13 Replies
Not applicable
Author

Hey,

I am sorry, but what am I suppose to open? There isn't any file attached, in you reply.

Shreya

Anonymous
Not applicable
Author

You can'see this?

Not applicable
Author

Nope!!!

pic1.jpg

Anonymous
Not applicable
Author

Hi,

No need to create variable in your case.

Create a graph with dimension Month and two expressions:

First expression in bar chart:

count(distinct {<PayRollYear ={$(=Max(PayRollYear))}>}EMPNO)

Second expression in line chart:

count(distinct {<PayRollYear ={$(=(Max(PayRollYear)-1))}>}EMPNO)