NewInPython
NewInPython

Reputation: 247

How do I add a string in a calculated field within Tableau?

Im new to tableau, and trying to create basic viz:

I have created a calculated field that calculated the percent values of a vector within tableau

Repex:

Cast Total
1    10
2    10
3    10

sum(Cast/10*100)

but this gives me the literal values when I plot it in a tree map. if I try to do

sum(Cast/10*100)+"%" or + "percent"

I get a syntax error.

Basically within the tree map I want to display it as 1"%" or 2% instead of it just written as 1 and 2.

How should I go about this?

Upvotes: 0

Views: 187

Answers (1)

Andy
Andy

Reputation: 3170

Wrap your numerical expression in STR() to treat it as a string:

STR(SUM([Cast]/10*100)) + '%'

Upvotes: 0

Related Questions