Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Feb 14, 2018 01:40 AM
Hi there,
I have a table with player points per game. Games are split by rows while points sit in a column.
In another table I want to work out the average points per game for that player.
From reading online I think ‘Rollup’ is what I should be trying. I get stuck as I seem to have to specify a record in the linked table in order to return any result - however obviously this means what I’m returning the average of one cell (which is not what I want).
The table design is as follows
Player table
Game | Points
A | 10
B | 20
Player career table
Average points per game
15 (this is calculated from the previous table)
Bonus point for telling me how to also calcluate ‘Most points scored in one game’ in the ‘Player career table’.
Many thanks :slightly_smiling_face:
Thomas
Feb 14, 2018 02:35 AM
No, you are getting the Average of all values of that field for all linked Records.
So if you have Player A, linked to Game A, Game B and Game C, with points 10, 15, and 17, the Rollup field in Players A will give you 14, which is the average of those 3 numbers.
Feb 14, 2018 11:07 AM
Thanks Elias - this put me on the right track. I wanted to avoid manually linking to each new record, which I couldn’t work out how to do until I stumbled upon realising that duplicating a record means that it’s added to the linked record by default (note that creating a new record doesn’t do this).
Anyways, thanks.
Feb 14, 2018 02:25 PM
What do you mean? :thinking:
I create new linked records from Table A inside Table B. So I am entering a new Player, y create his Games from his own Record.
Feb 16, 2018 03:35 PM
If I press + here:
and add ‘Match 3’ manually, ‘Match 3’ doesn’t automatically appear in a linked table:
(I wanted to put a screenshot here but the platform won’t let me post more than one image.)
However, if I duplicate the ‘Match 2’ record here:
(I wanted to put a screenshot here but the platform won’t let me post more than one image.)
it does automatically add ‘Match 3’ here:
(I wanted to put a screenshot here but the platform won’t let me post more than one image.)
I’m happy with the latter.
Thanks for your help.
Feb 17, 2018 12:22 AM
You can’t have “default linked records”. You can duplicate one of the previous (I do it a lot :grinning_face_with_sweat: ), or you can Group in the PlayerMatch table by Match, so when you are creating a Match and adding the Players, you only add the relation once, and if you create a new Match, you only have to link the first Player.
I think you have something like this:
Feb 17, 2018 06:47 AM
Thanks, haven’t tried grouping before