4 Replies Latest reply on Jun 14, 2016 10:00 AM by Chris Cantrell

# Table Worksheet as Data Source for new worksheet.

Hello Everyone,

I have a table in Tableau, fields of which I want to use in creating new calculated fields. I am not sure how is that possible. Is there a feature in Tableau which can help me do that? I can just think of creating the same table in excel and adding the file as a new data source which I don't want to do as my project is all about migrating from excel to Tableau for report generation.

Zibal

• ###### 1. Re: Table Worksheet as Data Source for new worksheet.

Hi Zibal,

Any chance you can send through a work book to show me an example of the problem? Then I can see if I can help!

Kind regards,

Amanda

• ###### 2. Re: Table Worksheet as Data Source for new worksheet.

Hi Amanda,

Below is the table I used to create new calculated fields.

I want to create a calculated field "A's percentage" calculated as {A / [Grand Total (Chris) - F]}. For this I need to use columns from the table which I am not sure how to. I have also attached .twbx for your reference. Please let me know if it is possible.

• ###### 3. Re: Table Worksheet as Data Source for new worksheet.

Hello again,

Sorry, I don't seem to be able to see the workbook. My best guess is a table calculation, but it I'm guessing if you are already trying out calculations, then you have a probably already tried that!

Amanda

• ###### 4. Re: Table Worksheet as Data Source for new worksheet.

Hey Zibal,

I think this might be what you are looking for? I built a calculated field, it picks up the total for each letter and then divides the total for the letter by the total for the row, not including F of course.

[Total Time]/(CASE [Category]

WHEN 'F' THEN NULL

ELSE {FIXED [Name]:SUM(IF CONTAINS([Category],'F') THEN Null ELSE [Total Time] END)}

END)

I don't like what happens with the grand totals, but I don't think that is avoidable given the nature of the calculation.

Hope this helps,

Chris