Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
wossenhh
Creator
Creator

Plan Vs. Actual

Hi QlikViewers,

I need some help with the following two tables. One has data for Plan and the other one is for Actual.

John has moved from his previous department (Sales) and start working in a new department (Marketing). He has worked couple of hours for Client 'A' before and after he moved to the new department. The same scenario, for Marry who got promoted in her current department (Finance) from Controller to Controller Supervisor and she had some hours per her new and old titles as shown the tables below.

Actual Table

ClientDepTitleEmployeeEmpIDHours
ASalesSales AssociatesJohn101129.50
AMarketingMarketing ManagerJohn10111.50
BFinanceControllerMarry200215
BFinanceController SupervisorMarry200310.50

Plan Table

EmpIDDepNameTitleStatusAB
101SalesJohnSales AssociateInactive4500
101MarketingJohnMarketing ManagerActive00
200FinanceMarryControllerInactive010
200FinanceMarryController SupervisorActive015

Now I want to create Plan Vs Actual table that shows the old & new titles and departments for all employees who put some hours for Client A, B and so on. Here is the table that I want to create.

DepTitleEmployeeHeadcountPlan AActual APlan BActual B
SalesSales AssociateJohn0450129.5000
MarketingMarketing ManagerJohn1011.5000
FinanceControllerMarry00010215
FinanceController SupervisorMarry10015310.50

Hope it is clear.

Thanks for your help in advance.

Wossen

1 Solution

Accepted Solutions
buzzy996
Master II
Master II

4 Replies
buzzy996
Master II
Master II

use this,

wossenhh
Creator
Creator
Author

Thanks Shiva! Almost there, but the headcount should be 2 for John and Marry, not 4. It should be 1 for Active status and zero for Inactive.

petter
Partner - Champion III
Partner - Champion III

Something like this?

2015-04-24 #1.PNG

buzzy996
Master II
Master II

Just repalce headcount expression with this: =If(Status='Active',count(EmpID),'0')

else PFA