# Sum if functionality - to sum values given a condition

Hey fellow gliders,

I am new to guide and need some advice on how to solve this problem.

I have a very basic data sheet

Essentially what I want to do is sum the total (which is quantity * price ) of each fund using something similar to a sum if function. How would I do this. In this case for fund 1 the result of what I want should be (556+500+190=1246) and for fund 2 the result should be (100+500=600).

Thanks

I have got somewhere

using a relation I managed to filter out the correct â€śassetsâ€ť but how do I only extract the funds?

I would first add a math column to calculate the total on each line. Then you can add a Rollup column to sum that total through the relation.

can you explain that in more detail? total for what? Have I not already done that?

It appears soâ€¦ simply follow the rest of @Jeff_Hager instructions and use a rollup column via your relation named â€śTestâ€ť and target your â€śTotalâ€ť column.

2 Likes

My apologies. I somehow missed seeing the Total column in both of your screenshots. Been staring at the screen to long.

Did you get this working?

I canâ€™t see how your â€śTestâ€ť relation is configured, but it doesnâ€™t look right from what I can see in the screen shot.

What you should be doing in that relation is matching the Fund column with itself.
You can then do a Rollup â†’ Sum â†’ Total via the relation to get the result youâ€™re after.

Got it working, used the videos on how to use relation and rollups and it made it crystal clear! Thanks guys!

3 Likes