I have data like this in Excel
table Cost_per_period
---------------------
ProjectId
FaseID
Period
Percentage
table cost_per_partner_per_fase
-------------------------------
ProjectID
FaseID
PartnerID
Amount
table partners
--------------
PartnerID
name
Here's the output I want.
2012 2013 2014 2015
Project fase jan feb ... dec Q1 Q2 Q3 Q4 wholeY wholeY
------------------------------------------------------------------------
A310 1 100k 20k 10k 100k - 10k 10k 1000k 2000k
A310 2 110k - 20k 99k - 40k 50k 5000k 3000k
......
To combine this data, I'm thinking of doing a SQL statement like
SELECT cp.projectID, cp.faseID
, case when cp.period between '2012/01/01' and '2012/01/31'
THEN sum(cpf.amount)*cp.percentage as jan2012 end
, case when ..... as feb2012 end
, case .......
FROM cost_per_period as cp
INNER JOIN cost_per_partner_per_fase as cpf
on (cp.postjectid = cpf.projectid) and (cp.faseid = cpf.faseid)
GROUP BY cp.Projectid, cp.faseid
ORDER BY cp.ProjectID, cp.FaseID
Can I do this using only Excel?, I'm using excel 2007