9 Replies Latest reply on Jun 14, 2018 11:27 AM by Deepak Rai

# Lookup Running Sum

Hi All -

I have been having an issue getting this to work in Tableau and I was hoping someone get help me. Essentially I have a list of part numbers based on order date and how many of those parts are required.

What I need to do is have essentially a running sum of what is required by part number (Goal in Tableau).

 Order Part Number Due Date Required Consumed Above A 581000 2/6/2017 9 0 B 660510 2/6/2017 1 0 C 971688 2/6/2017 4 0 D 660510 2/6/2017 4 1 E 971688 8/30/2017 4 4 F 581000 8/31/2017 1 9 G 971688 8/31/2017 1 8 H 971688 8/31/2017 1 9

This has a semi-urgent time frame so any assistance at all would be very helpful.

• ###### 1. Re: Lookup Running Sum

You can do this by creating a quick calculation of "Running Sum" on SUM(Required), then editing the table calculation as follows:

See the attached workbook.

• ###### 2. Re: Lookup Running Sum

Like This?

• ###### 3. Re: Lookup Running Sum

I made some updates to the table. After talking to my boss he is wanting to see a "Consumed Above" value which adds the Required quantity of every time that part number occurs above the current part number. See new table.

This is a little trickier which is why I was having some issues with it.

Also, I added an order number bc each row is a different customer order.

• ###### 4. Re: Lookup Running Sum

I made some updates to the table. After talking to my boss he is wanting to see a "Consumed Above" value which adds the Required quantity of every time that part number occurs above the current part number. See new table.

This is a little trickier which is why I was having some issues with it.

Also, I added an order number bc each row is a different customer order.

• ###### 5. Re: Lookup Running Sum

Sorry..Requirement is not Clear to me.

• ###### 6. Re: Lookup Running Sum

No problem, let me see if I can help. I would like the "Consumed Above" column to take a running sum of the required field for every row that the part number exists. For example in the first 3 rows, the value is 0 because they are the first instance of that part number. For Order D however, it is the second time that part 660510 has been ordered and the consumed above would be 1 because order B had 1 required. Does that help?

 Order Part Number Due Date Required Consumed Above A 581000 2/6/2017 9 0 B 660510 2/6/2017 1 0 C 971688 2/6/2017 4 0 D 660510 2/6/2017 4 1 E 971688 8/30/2017 4 4 F 581000 8/31/2017 1 9 G 971688 8/31/2017 1 8 H 971688 8/31/2017 1 9
• ###### 7. Re: Lookup Running Sum

I actually figured it out but I need another table calculation get the 0 value if it is the first occurrence. Is there a way to see the background calculation for a Table Calculation at the deepest level so that I can use it in another formula?

• ###### 8. Re: Lookup Running Sum

I actually figured it out but I need another table calculation get the 0 value if it is the first occurrence. Is there a way to see the background calculation for a Table Calculation at the deepest level so that I can use it in another formula?

• ###### 9. Re: Lookup Running Sum

Can you post the Solution, I was already Half way on this.

Thanks

Deepak