8 Replies Latest reply on Oct 29, 2018 3:50 PM by Don Wise

# Running Sum By ID

Hello All,

I am trying to create a calculated field for a running sum of column "Total" for each of my serial numbers. I can't seem to figure it out. Here is an example in excel of what i am trying to do. The column all the way to the right is what i'm trying to generate as a calculated measure. I want this column to start back at zero for each new serial number. It needs to sum the values in the "Total" column. I'm guessing i need some sort of level of detail expression in my calculated field, which I am very new to. Can anyone help me out here?  I can't attach my actual file because it's for work and I can't share.

 Serial Number Month Total Serial number Running sum 111111 1 0 0 111111 2 0 0 111111 3 1 1 111111 4 2 3 111111 5 0 3 111111 6 0 3 111111 7 4 7 111111 8 0 7 111111 9 0 7 111111 10 0 7 111111 11 1 8 111111 12 0 8 222222 1 0 0 222222 2 0 0 222222 3 1 1 222222 4 0 1 222222 5 0 1 222222 6 4 5 222222 7 0 5 222222 8 0 5 222222 9 0 5 222222 10 0 5 222222 11 0 5 222222 12 2 7
• ###### 1. Re: Running Sum By ID

Hi Maria,

See attached 2018.2 workbook and below screenshot. Thx, Don

• ###### 2. Re: Running Sum By ID

that looks like it's just a table calculation, i want it to be a calculated field that i can use later. is there a way to do that?

• ###### 3. Re: Running Sum By ID

FYI,

• ###### 4. Re: Running Sum By ID

This doesn't address my question of calculating the running sum for just a specific ID, not the entire table. So for example, in your table, a running sum by each individual customer name.

• ###### 5. Re: Running Sum By ID

i want the functionality of what Don showed above but with a calculated field instead of a table calculation.

• ###### 6. Re: Running Sum By ID

Hi Maria,

Yes, it is a Table Calc using Specific Dimensions with the following structure and set to restart every ID: RUNNING_SUM(SUM([Total]).

I initially thought about an LOD to be used, but because you're asking for a Running Sum, and that's a table calculation - we cannot create an LOD calculation using a Table Calc as an LOD.