Add sum of individual scores to pivot table using a calculated field

bunkermentality

New Member
Joined
Sep 27, 2022
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
I'm trying to create what seems to me should be a simple task. But I'm failing badly. I suspect that my underlying data has the wrong design.

My source data "Playing Metric"s is a list of scorers from a series of rugby matches. Scores are called Try, Conversion and Penalty. Values are Try = 5, Conversion =2 and Penalty = 3.

On the pivot sheet I can see the total scores per player but I want to add a calculated column F with formula Try*5+Conversion*2+Penalty*3. Try as I might I cannot make this happen.

Any advice would be most welcome

Ealing 1871 Training and Playing Records 2022-23.xlsx
ABCDEF
1DateForenameSurnameFull NameMetricAmount
220/08/2022A000001B000001B000001, A000001Try2
320/08/2022A000002B000002B000002, A000002Try1
420/08/2022A000003B000003B000003, A000003Conversion1
503/09/2022A000004B000004B000004, A000004Try2
603/09/2022A000005B000005B000005, A000005Try1
703/09/2022A000006B000006B000006, A000006Try2
803/09/2022A000007B000007B000007, A000007Try1
903/09/2022A000008B000008B000008, A000008Try2
1003/09/2022A000009B000009B000009, A000009Try1
1103/09/2022A000010B000010B000010, A000010Conversion5
1203/09/2022A000011B000011B000011, A000011Try1
1303/09/2022A000012B000012B000012, A000012Conversion2
1403/09/2022A000013B000013B000013, A000013Try1
1503/09/2022A000014B000014B000014, A000014Try1
1603/09/2022A000015B000015B000015, A000015Try1
1703/09/2022A000016B000016B000016, A000016Try1
1803/09/2022A000017B000017B000017, A000017Try1
1903/09/2022A000018B000018B000018, A000018Conversion1
2003/09/2022A000019B000019B000019, A000019Conversion2
2110/09/2022A000020B000020B000020, A000020Try2
2210/09/2022A000021B000021B000021, A000021Try3
2310/09/2022A000022B000022B000022, A000022Try1
2410/09/2022A000023B000023B000023, A000023Conversion1
2510/09/2022A000024B000024B000024, A000024Conversion6
2610/09/2022A000025B000025B000025, A000025Penalty3
2710/09/2022A000026B000026B000026, A000026Try1
2810/09/2022A000027B000027B000027, A000027Try1
2910/09/2022A000028B000028B000028, A000028Try1
3010/09/2022A000029B000029B000029, A000029Try1
3110/09/2022A000030B000030B000030, A000030Conversion2
3210/09/2022A000031B000031B000031, A000031Try1
3310/09/2022A000032B000032B000032, A000032Try1
3417/09/2022A000033B000033B000033, A000033Penalty1
3517/09/2022A000034B000034B000034, A000034Try1
3617/09/2022A000035B000035B000035, A000035Conversion1
3717/09/2022A000036B000036B000036, A000036Try1
3817/09/2022A000037B000037B000037, A000037Try1
3917/09/2022A000038B000038B000038, A000038Conversion1
4017/09/2022A000039B000039B000039, A000039Penalty3
4117/09/2022A000040B000040B000040, A000040Try1
4217/09/2022A000041B000041B000041, A000041Try1
4317/09/2022A000042B000042B000042, A000042Try1
4417/09/2022A000043B000043B000043, A000043Try1
4517/09/2022A000044B000044B000044, A000044Try1
4617/09/2022A000045B000045B000045, A000045Conversion7
4717/09/2022A000046B000046B000046, A000046Penalty2
Playing Metrics
Cell Formulas
RangeFormula
D2:D47D2=CONCATENATE(C2&", "&B2)


Ealing 1871 Training and Playing Records 2022-23.xlsx
ABCDEF
1
2Points
30
4SUM of AmountMetric
5Full NameConversionPenaltyTry(blank)
6B000001, A0000012
7B000002, A0000021
8B000003, A0000031
9B000004, A0000042
10B000005, A0000051
11B000006, A0000062
12B000007, A0000071
13B000008, A0000082
14B000009, A0000091
15B000010, A0000105
16B000011, A0000111
17B000012, A0000122
18B000013, A0000131
19B000014, A0000141
20B000015, A0000151
21B000016, A0000161
22B000017, A0000171
23B000018, A0000181
24B000019, A0000192
25B000020, A0000202
26B000021, A0000213
27B000022, A0000221
28B000023, A0000231
29B000024, A0000246
30B000025, A0000253
31B000026, A0000261
32B000027, A0000271
33B000028, A0000281
34B000029, A0000291
35B000030, A0000302
36B000031, A0000311
37B000032, A0000321
38B000033, A0000331
39B000034, A0000341
40B000035, A0000351
41B000036, A0000361
42B000037, A0000371
43B000038, A0000381
44B000039, A0000393
45B000040, A0000401
46B000041, A0000411
47B000042, A0000421
48B000043, A0000431
49B000044, A0000441
50B000045, A0000457
51B000046, A0000462
52(blank)
53Grand Total29938
Playing Metrics Pivot
Cell Formulas
RangeFormula
F3F3=D3*5+B3*2+C3*3
 

Attachments

  • s2.jpg
    s2.jpg
    52.3 KB · Views: 3

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi, Welcome to the forum.

In F2, would something like this work for you ?

Excel Formula:
=IF(E2="Try",5,IF(E2="Conversion",2,IF(E2="Penalty",3,"")))

I am assuming your raw data operates in a way such that if the same player scores 2 tries in a match, they would appear on seperate rows of data (as you don't have a qty column).
If you had a qty column added, then you would change my formula to show [5*Qty_Column_ref] instead of just "5"

Let me know if that helps

cheers
Rob
 
Upvote 0
Hi, Welcome to the forum.

In F2, would something like this work for you ?

Excel Formula:
=IF(E2="Try",5,IF(E2="Conversion",2,IF(E2="Penalty",3,"")))

I am assuming your raw data operates in a way such that if the same player scores 2 tries in a match, they would appear on separate rows of data (as you don't have a qty column).
If you had a qty column added, then you would change my formula to show [5*Qty_Column_ref] instead of just "5"

Let me know if that helps

cheers
Rob
Rob,

Thanks for your help. The raw data has implicit quantity values. See first screenshot.

I understand your formula. But what I'm seeking is a Pivot Table calculated field that does similar. This will extend the range of the Pivot table results into Column F.

Sincerely, Paul
 

Attachments

  • s3.jpg
    s3.jpg
    44.7 KB · Views: 4
  • s4.jpg
    s4.jpg
    27.9 KB · Views: 4
Upvote 0
Hi Paul,

Understood. I don't think you can do it in std. pivot tables, as to reference a particular column with an IF statement is not possible (eg. calculated fields don't like arrays or cell references here, as by nature of it being a pivot - they move a lot).

I think you'd be better including a new column in your raw data which just calculates the sore (using the IF formula I shared) for each. Then you can pull it into the Pivot as needed.

Apologies not to find an alternative for you (myself..)

Rgds
Rob
 
Upvote 0
Thanks again. Your formula =IF(E2="Try",5,IF(E2="Conversion",2,IF(E2="Penalty",3,""))) isn't needed as I can use =(Try*5)+(Conversion*2)+(Penalty*3). Is this doable?

If not I need to restructure the source data somehow as

Date,Name,Metric,Quantity e.g. 23/9, Paul, Try, 2 doesn't allow me to sum all scores for Paul

Maybe
Date,Name,Try,Conversion,Penalty e.g. 23/8, Paul, 3, 2, 4,

Sincerely, Paul
 
Upvote 0
Looking at your original post, looks like you were trying to get a total score for each row - which essentially I'm saying you need to add to your raw data. As Col F looks like it contains the amount of tries scored by an individual for a given game, you'd have to use Col F as your multiplier, and put your formula into Col G ?


Rob
 
Upvote 0
Solution
Looking at your original post, looks like you were trying to get a total score for each row - which essentially I'm saying you need to add to your raw data. As Col F looks like it contains the amount of tries scored by an individual for a given game, you'd have to use Col F as your multiplier, and put your formula into Col G ?


Rob
Rob,

You are correct. I have restructured my source data so that I can apply a formula. Works a treat now. As I initially urmised the solution is obvious, but I couldn't see it! :-)

Thanks for your help.

Paul
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top