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

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

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

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

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