6 Replies Latest reply on Mar 8, 2016 3:07 PM by Gerardo Varela

# Obtaining a Quotient of Two seperate Table Calculations

Tableau Community -

Thank you in advance for any help.

Possible to generate a calculated field that creates the value in column C? I explored trying to use a number of functions including LOOKUP, but couldn't get anything to function properly.

 A B C 1 Dimension 1 (Week) Dimension 2 (Value) Dimension 3 (Running Total) 2 8 V1 V1 3 7 V2 V1+V2 4 6 V3 V1+V2+V3

Hi ,

• ###### 2. Re: Obtaining a Quotient of Two seperate Table Calculations

Hi J P,

Always helpful to attach a sample workbook to give specific help. From the screenshot you showed it is hard for me to grasp why you need a running sum in the first place. Why is SUM() not enough? Apart from this, you can indeed use table calculations in Calculated Fields.

The calculation would be something like: RUNNING_SUM(SUM([Earned Value]))/RUNNING_SUM(SUM([Planned Value]))

Kind regards,

Justus

InterWorks

1 of 1 people found this helpful
• ###### 3. Re: Obtaining a Quotient of Two seperate Table Calculations

Justus & Tharashasank -

Very much appreciate the desire to help!  Took me a bit to package a workbook for distribution.  A simple sum does not work because the calculations are summations over time used to calculate out the Schedule Performance Index. I've embedded the formulas below.

I have the first two formulas functioning using table calculations and restarting ever Readiness Site ID, but the third is proving elusive.  The formula suggested above does not work.  When adjusting it to RUNNING_SUM(SUM([Actual Value]))/RUNNING_SUM(ATTR([Wk # Questions])), that gets it CLOSER, but none of the values are correct.  I am attaching a packaged workbook in hopes that will help.

Thanks to anyone who can assist.

• ###### 4. Re: Obtaining a Quotient of Two seperate Table Calculations

JP,

Thank you for posting a packaged workbook.  It really helps us play with your calculations and see how everything is setup.  In the future, would it be possible for you to let us know what version of Tableau Desktop it was made in? I'm not sure if you need to restart your calculation at every readiness site id but hopefully the attached, vs 9.0, will get you pointed in the right direction.  If I misunderstood you or you need more help, please post back.

Regards,

Gerardo

2 of 2 people found this helpful
• ###### 5. Re: Obtaining a Quotient of Two seperate Table Calculations

You sir, are a saint.  Window_Sum along Cell did the trick.  Thanks so much!