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

查看:1322
本文介绍了如何在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天全站免登陆