How to format new measure (not column) in power BI as percentage?

妖精的绣舞 提交于 2019-12-07 05:08:07

问题


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?


回答1:


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

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)

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

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



回答2:


There is another way to convert the value into % in Power BI Desktop.

  1. Create a measure with simple Divide formula
  2. Click on the name of measure in FIELDS section
  3. Go to Modeling tab and select % sign in Formatting section

The field will automatically be converted to % value.



来源:https://stackoverflow.com/questions/38353064/how-to-format-new-measure-not-column-in-power-bi-as-percentage

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!