andybrown115
New Member
- Joined
- Jul 13, 2017
- Messages
- 9
I have a set of system-exported data that shows me how much margin/profit we make on a particular timesheet that comes in from some of our contractors. The deals that are done are split between our sales consultants in our timesheet system. so a timesheet that makes us £100 may be split 70/30 between two consultants - so one consultant would have £70 with the other getting £30 against their target for the week.
What I am struggling with is the way the data comes out and then populating that into a pivot table. This is what comes out:
[TABLE="class: head"]
<tbody>[TR="bgcolor: #E0E0F0"]
[TH][/TH]
[TH]
A
[/TH][TH]
B
[/TH][TH]
C
[/TH][TH]
D
[/TH][TH]
E
[/TH][TH]
F
[/TH][TH]
G
[/TH][TH]
H
[/TH][TH]
I
[/TH][TH]
J
[/TH][TH]
K
[/TH][TH]
L
[/TH][TH]
M
[/TH][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
1
[/TD][TD]Contractor[/TD]
[TD]Margin[/TD]
[TD]CON1[/TD]
[TD]CON2[/TD]
[TD]CON3[/TD]
[TD]PERC1[/TD]
[TD]PERC2[/TD]
[TD]PERC3[/TD]
[TD]SPLIT1[/TD]
[TD]SPLIT2[/TD]
[TD]SPLIT3[/TD]
[TD]Invoice Week[/TD]
[TD]Timesheet Week[/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
2
[/TD][TD]Bloggs, Joe[/TD]
[TD]
105.69
[/TD][TD]
KG
[/TD][TD][/TD]
[TD][/TD]
[TD]
100
[/TD][TD][/TD]
[TD][/TD]
[TD]
105.69
[/TD][TD]
-
[/TD][TD]
-
[/TD][TD]
04/03/2018
[/TD][TD]
07/01/2018
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
3
[/TD][TD]Wiggins, Bradley[/TD]
[TD]
204.50
[/TD][TD]
KG
[/TD][TD]
RA
[/TD][TD][/TD]
[TD]
70
[/TD][TD]
30
[/TD][TD][/TD]
[TD]
143.15
[/TD][TD]
61.35
[/TD][TD]
-
[/TD][TD]
04/03/2018
[/TD][TD]
14/01/2018
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
4
[/TD][TD]Knightly, Kiera[/TD]
[TD]
199.00
[/TD][TD]
RA
[/TD][TD][/TD]
[TD][/TD]
[TD]
100
[/TD][TD][/TD]
[TD][/TD]
[TD]
199.00
[/TD][TD]
-
[/TD][TD]
-
[/TD][TD]
04/03/2018
[/TD][TD]
21/01/2018
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
5
[/TD][TD]Jones, Dave[/TD]
[TD]
203.00
[/TD][TD]
RA
[/TD][TD]
KG
[/TD][TD]
QSW
[/TD][TD]
50
[/TD][TD]
15
[/TD][TD]
35
[/TD][TD]
101.50
[/TD][TD]
30.45
[/TD][TD]
71.05
[/TD][TD]
04/03/2018
[/TD][TD]
07/01/2018
[/TD][/TR]
</tbody>[/TABLE]
So Bradley's timesheet value is £204.50 split 70/30 between consultants KG and RA respectively.
I'd not have an issue pivoting that to show the data if each split was shown on a separate row. But as it's across columns I'm a little baffled. I can neither think of a good formula to append to the data table nor a way to arrange the pivot table.
'I want' the pivot table to look like the below. The split margin is the sum of each consultant's initials against the SPLIT1 SPLIT2 or SPLIT3 as appropriate.
PIVOT TABLE
[TABLE="class: head"]
<tbody>[TR="bgcolor: #E0E0F0"]
[TH][/TH]
[TH]
A
[/TH][TH]
B
[/TH][TH]
C
[/TH][TH]
D
[/TH][TH]
E
[/TH][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
7
[/TD][TD]Invoice Week[/TD]
[TD]Consultant[/TD]
[TD]
Contractor
[/TD][TD]Timesheet Week[/TD]
[TD]Split Margin[/TD]
[/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
8
[/TD][TD]
04/03/2018
[/TD][TD]KG[/TD]
[TD]Bloggs, Joe[/TD]
[TD]
07/01/2018
[/TD][TD]
105.69
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
9
[/TD][TD][/TD]
[TD][/TD]
[TD]Wiggins, Bradley[/TD]
[TD]
14/01/2018
[/TD][TD]
143.15
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
10
[/TD][TD][/TD]
[TD][/TD]
[TD]Jones, Dave[/TD]
[TD]
07/01/2018
[/TD][TD]
30.45
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
11
[/TD][TD][/TD]
[TD]RA[/TD]
[TD]Wiggins, Bradley[/TD]
[TD]
14/01/2018
[/TD][TD]
61.35
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
12
[/TD][TD][/TD]
[TD][/TD]
[TD]Knightly, Kiera[/TD]
[TD]
21/01/2018
[/TD][TD]
199.00
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
13
[/TD][TD][/TD]
[TD][/TD]
[TD]Jones, Dave[/TD]
[TD]
07/01/2018
[/TD][TD]
101.50
[/TD][/TR]
[TR="bgcolor: #FFFFFF"]
[TD="bgcolor: #E0E0F0"]
14
[/TD][TD][/TD]
[TD]QSW[/TD]
[TD]Jones, Dave[/TD]
[TD]
07/01/2018
[/TD][TD]
71.05
[/TD][/TR]
</tbody>[/TABLE]
Slicers would be added for each piece of pivot data used.
I've answered a question on this forum this morning in the hope that my kindness will pay forward. Karma.
Thanks in advance!