4 Replies Latest reply on Sep 11, 2013 12:41 PM by Shawn Wallwork

# Table Calculation Issue

I am new to table calculation in tableau, pls help me with correct steps.

There are columns in a worksheet

Part Number     Date(mm/dd/yyyy)     Unit Price     Variance Price          Variance Price(expected)

Part1                    09/01/2013               12

Part1                    07/05/2013               12                    0                                   0

Part1                    03/06/2013               12                   0                                   0

Part2                    09/03/2013                50                   38

Part2                    04/03/2013                47                    -3                                  -3

Part2                    02/09/2013                50                    3                                   3

So through table calculation i am getting the output in Variance Price (coulmn no. 4), where as i expect the output as in column 5

So , as the part number changes the table calculation should restart.

I tried with table calculation as :

Calculation Type: Difference From

Calculate the diff along :  Table Down

Display the value as diff from: Previous

It does not let you set the restarting point.

Pls help me with this.

Thanks Dolly

• ###### 1. Re: Table Calculation Issue

The value 38 getting populated because the calculation is restarting at the "Part Number" level.

Request you folks to help me on this.

Thanks,

Dolly

• ###### 2. Re: Re: Table Calculation Issue

Hi Parvinder, I'm happy to help you, but in the future please don't post a workbook with the Update paused. Thanks.

You are looking for an Advanced table calculation like this: I've attached a 7.0 workbook.

Cheers,

--Shawn

• ###### 3. Re: Re: Table Calculation Issue

Sure,Thanks for your help Shawn. But the window does not give the option to restart it gives me a different option.

Can you pls suggest why it is so.

Thanks for your help.

Thanks,

Parvinder

• ###### 4. Re: Re: Table Calculation Issue

Yeah it's one of those Tableau quirks. Start with a brand new calculated field and then paste this in:

ZN(SUM([Variance])) - LOOKUP(ZN(SUM([Variance])), -1)

Now drop that on top of the quick table calculation you currently have. And then set the compute using the exact same as the png I posted. Now you'll have the Restart option.

--Shawn