2 Replies Latest reply on Sep 29, 2018 10:17 PM by Dan Barrington

# Excel Percent to Tableau String

I'm facing an issue where I've done my calculations and formatting in Excel (so the field/percentage shows exactly how I want it to in Excel), but I cannot migrate that format into Tableau.

I've seen threads discussing the math, but this is a question about format. So far, I've tried the following two scenarios:

Scenario 1: I have a cell in Excel with the value 2.1%. Now, I would like to display it as just that in Tableau however, if the value is null (in Excel), then I want to display "Value Not Found" in Tableau. Here is what I thought would work:

Create a calculated field in Tableau with the following formula:

ELSE STR([cell])

END

This does not work. it displays the full value of the percentage, prompting me to change the formula to:

ELSE STR(ROUND([cell],1)) + '%'

END

Or:

ELSE STR(ROUND([cell] *100,1)) + '%'

END

The ROUND function is not working as I would expect in this case (unless the second parameter of the ROUND function is changed to 0, many decimal places are displayed after the decimal, no matter what I make the second parameter).

The second scenario is pretty much the same, the only difference is I tried making the number just a general number in Excel, and then doing the conversion in Tableau. I did see one thread about this issue when dealing with a SUM, but I wasn't able to clearly translate that to my situation. Any help on the matter is appreciated. Thank you very much in advance.

• ###### 1. Re: Excel Percent to Tableau String

When you create the data source in Tableau, you can change the data type of the column under "Edit Data Source".  Change it from numeric to string.  It should preserve the formatting of the data you have in those cells.  And the field will become a string field.  You can make another calc that does if ISNULL and set it to  whatever you want, ELSE keep the value as is.

• ###### 2. Re: Excel Percent to Tableau String

Thank you very much Joe. I hadn't thought about manipulating the dataset within Tableau.