skip to Main Content

Writing a Subtotal Calc Column, AKA The Simplest Use of the Earlier() Function

 
I am a bit behind the 8-ball today, so here’s a quick topic.  It’s actually an excerpt from an older post, but one that has long deserved to be its own standalone post.

If you want to calculate a column in a table that is the total of all “similar” values in that table – meaning the total of all rows that have the same value as the current row for a particular column (or columns), this is what you need.

Say I have the following VERY simple table like this:

image

And I want to add a third column that is the total for each customer:

A PowerPivot column that is the total of all “similar” values in that table – meaning the total of all rows that have the same value as the current row for a particular column (or columns)

The calc column formula for that third column is this:

Read the Rest