Help

Re: Average of linked table column

1553 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Thomas_Grist
6 - Interface Innovator
6 - Interface Innovator

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

6 Replies 6

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.

Thomas_Grist
6 - Interface Innovator
6 - Interface Innovator

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.

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.

Thomas_Grist
6 - Interface Innovator
6 - Interface Innovator

If I press + here:

02

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.

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:

6b7b6c4d65b1f45726d18d58e974f678792c5e49.gif

Thomas_Grist
6 - Interface Innovator
6 - Interface Innovator

Thanks, haven’t tried grouping before