如何将 Power BI 中的新度量(不是列)格式化为百分比? [英] How to format new measure (not column) in power BI as percentage?

查看:37
本文介绍了如何将 Power BI 中的新度量(不是列)格式化为百分比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用公式创建新度量时,即 sum(col1)/max(col2),它会自动将结果转换为 #.#% 格式.奇怪的是,它不会一直发生.有时它只是给出结果#.## 格式.

When I create a new measure with formula, i.e. sum(col1)/max(col2), it automatically converts the result into #.#% format. Strangely, it doesn't happen all the time; sometimes it just gives result #.## format.

知道如何将新度量(而不是列)格式化为百分比吗?

Any idea of how to format a new measure (not column) to be treated as percentage?

推荐答案

在 Power BI 中,当您输入度量时,任务栏中会出现一个选项.

In Power BI there is a option in the taskbar when you enter your measure.

在 Power Pivot for Excel 中,您可以直接在度量编辑器中选择格式(或计算字段的编辑器.名称取决于您的 Excel 版本)

In Power Pivot for Excel you can select the format directly in the measure editor (Or editor for calculated fields. The name depends on your version of Excel)

如果要手动接管也可以使用Format()公式:

If you want to take over manually you can also use the Format() formula:

= FORMAT(Sum(Table[Field]),"0.00%")

这篇关于如何将 Power BI 中的新度量(不是列)格式化为百分比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆