3 Replies Latest reply on Jul 12, 2013 3:24 AM by Shawn Wallwork

# Parse Total Field through Calculation

I have Dimension with 2 distinct Values, So tableau Parses two Columns or Rows or Color.

I want to add a third value which represent 3rd Value (Row or Column or Color ) as Total.

I used Below Calculation as insight to the formula.

if [Country] = 'India' then 1

elseif [Country] = 'USA' then 2

elseif ([Country] = 'India' or [Country] = 'US' ) then 3

end

Naturally the Above formula doesn't works.Can I have a working Alternative?

Column country has only 2 distinct Values: India, US.

I cannot use table Calculation as I am using Multiple Measures (mostly Growth related like QoQ, YoY etc) in my Sheet.

So linear Table calculations wont fit either.

• ###### 1. Re: Parse Total Field through Calculation

I don't believe you can trick Tableau into being illogical. Your formula is "Naturally" illogical, so then any alternative answer will have to also be illogical. Now if you can better explain what the number 3 represents and under what condition this magical new value would appear, then we can help  you out.

--Shawn

• ###### 2. Re: Re: Parse Total Field through Calculation

Hi Shawn,

Attaching a sample excel for reference.

It is a mock-up of the sheet in question.

Will not be able to share the original data. Feel free to ask if any mock-up for data is required.

When I turn on Row Grand Total ,  the Total Pane is shown(desired as format point of view) with no Values.

The Total Pane was number 3