---
schema_version: "1"
id: 72d5ccb2593329d9dec2286ff822980f542cfb35d6baffbc4ee6dc4b188077f6
title: Tableau 中的 FORMAT() 函数解决方法
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/pro/desktop/format_fields.md
canonical_url: https://help.tableau.com/current/pro/desktop/zh-cn/format_fields.htm
source_site: help.tableau.com
content_type: documentation
content_hash: a39e55ee88c7b21614b8ed1a45f5cb6b7d1674b18c29a98956832c3e03e0d57b
description: Use workarounds for formatting fields since Tableau has no FORMAT() function.
---
[跳转到主要内容](#main-content)

# Tableau 中的 FORMAT() 函数解决方法

Tableau 没有用于设置字段格式的 FORMAT() 函数，但却提供了各种方式来更改工作簿中字段的结构和外观：

- 地理字段，请参见[分配地理角色](https://help.tableau.com/current/pro/desktop/zh-cn/maps_geographicroles.htm)。
- 日期或数字字段，请参见[设置默认数字格式](https://help.tableau.com/current/pro/desktop/zh-cn/datafields_fieldproperties.htm#DefFormat)。
    - 自定义日期格式，请参见[自定义日期格式](https://help.tableau.com/current/pro/desktop/zh-cn/dates_custom_date_formats.htm)。
- 可用于指定字段格式的符号和约定，请参见[文本表达式语法](https://help.tableau.com/current/pro/desktop/zh-cn/functions_operators.htm#literals)。
- 数字和 null 值，请参见[设置数字和 Null 值的格式](https://help.tableau.com/current/pro/desktop/zh-cn/formatting_specific_numbers.htm)。

Tableau 还提供了一系列字符串函数，可用来自定义字符串字段在视图中的外观。请参见[字符串函数](https://help.tableau.com/current/pro/desktop/zh-cn/functions_functions_string.htm)。