Hello Set Shot,
Open the Summary properties dialog. Click on the Fields tab. Define a measure based on "scale gains". This will default to Sum(scale_gains). Double click on this in the measures window of this tab. This will bring up a window with three tabs - General, Calculation, and Colouring & Limits. In the Calculation tab, click on the edit button, and enter the formula as you wrote it in your post.
That should do the trick.