
1. Re: How to calculate the following...
Steve Martin Mar 11, 2016 8:08 AM (in response to Elle Morel)Hi Elle,
Please can you clarify the calculations you need to produce your numbers eg ScenarioName3 = ScenarioName2 / ScenarioTotal
Better yet, please can you provide an Excel workbook detailing how your raw data will get to Tableau and the calcs you need so we can see how you got to your output.
To answer your question, yes, the calculation you require is simple you simply identify the position of your value using a Lookup(,0) calc and then perform you calc against the Total so assuming the calculation is ScenarioName3 = ScenarioName2 / ScenarioName1Total you calc would be:
Lookup(Sum(ScenarioName2),0) / Total(Sum(ScenarioName1))
Steve

2. Re: How to calculate the following...
Elle Morel Mar 11, 2016 10:26 AM (in response to Steve Martin)Thx, Steve!! For some reason, I can't make it work using Lookup()  either to create the right calculations as illustrated in my original message, or be able to insert the new calculated fields b/w ScenarioName2&3, ScenarioName3&4... Actually I am pulling date directly from SQL Server. Column ScenarioName in DB just has values like ScenarioName1, ScenarioName2, 3, 4, 5, while SaleAmt1, SaleAmt2... columns in DB have the actual values, and they are used as Measured Values and put onto the Row in Tableau view. Could u pls advise what can be done? Thx a bunch!!

3. Re: How to calculate the following...
Steve Martin Mar 11, 2016 11:50 PM (in response to Elle Morel)1 of 1 people found this helpfulApologies Elle, I misread your first.
Unless you have a specific purpose, you will not need the lookup function, your calc is just the sum over the total so in this instance building on from my previous post assuming ScenarioName3 = ScenarioName2 / ScenarionName1Total then your calc would be:
Sum(ScenarioName2) / Total(Sum(ScenarioName1))
If you are struggling with this, please can you provide an excel worksheet with your calcs and a packaged workbook ensuring your uploaded data is sanitised or using Superstore Sales.
Steve

4. Re: How to calculate the following...
Elle Morel Mar 14, 2016 3:19 PM (in response to Steve Martin)thx, steve! i think now i got it  there is NO way to insert the new tableau calculated fields b/w scenarioName1, scenarioName2, 3, 4, 5, as they are NOT numeric columns, one can only insert the new Tableau calculated fields b/w the numeric columns SaleAmt1, SaleAmt2, 3. pls correct me if my understanding is wrong.

5. Re: How to calculate the following...
Steve Martin Mar 15, 2016 3:10 AM (in response to Elle Morel)I am uncertain as to why you need to insert the calculation between text fields  this is different from your original post and table layout above.
Please can you fully explain your requirement and post a workbook so that I can see exactly what it is you are trying to do; you can use Superstore Sales as your data.
So Your Question Didn't Get Answered...
Steve