简体   繁体   中英

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?

将数值表达式包装在STR() ,将其视为字符串:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM