6 Replies Latest reply on Oct 27, 2016 10:59 AM by Sherzodbek Ibragimov

# Basic Table Calculation

Hi,

I am trying to create a sheet (my first one) in Tableau and want to create a calculated column field for new business as a percentage of total business

We have new and repeat business and I would like to see what New Business / Total Business is.

The columns field is set to the transaction type - New and Repeat with a grand total added in.

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

Just to give more detail -

The column is a dimension and I am not sure how to filter a specific dimension for a calculation. Thanks.

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

David try this formula:

if ATTR(Type='New') then Sum (Sales) end

if ATTR(Type='Repeat') then Sum (Sales) end

% of Total

1 of 1 people found this helpful
• ###### 3. Re: Basic Table Calculation

Hi

Thanks for your help with this.

The columns that I have set are based on the transaction type filter (new or repeat business). When I create the measures based on the formulas you suggested it doesn't show the actual values for some reason.

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

David

• ###### 5. Re: Basic Table Calculation

Sherzodbek,

Thanks for your help. I was able to get to the answer I was looking for. The problem was how I was creating the measurement. I changed the formula slightly.

Here is what I ended up using for repeat business

sum(IF [New Repeat]='REPEAT' then [Sales] else 0 END)

1 of 1 people found this helpful
• ###### 6. Re: Basic Table Calculation

David,

I am glad you were able to achieve what you wanted. Also, if you can marked this question as assumed answer or correct answer, it will clear out from community members who wants to help other users, plus help other user to solve it who has the same issues as yours. Thanks again.

1 of 1 people found this helpful