Skip to main content

Power BI

New

DAX Format () function changes Measures to format text in Power BI

Vote (17) Share
Niek Verhoef's profile image

Niek Verhoef on 26 Jun 2017 17:51:53

I created the possibility to select currency in my report. Via the function FORMAT () I want to dynamicly change the format showing a $ or € sign depending on the currency selection. When using DAX Format () function the format in Power BI changes to text.

Please fix this a.s.a.p.
Because of this the measure can only be used in a bar chart as Tooltip and in the Card visual the Display Units obviously don't work.

Comments (3)
Niek Verhoef's profile image Profile Picture

df9eac80 f637-4799-8576-17ffbcea3feb on 05 Jul 2020 23:57:00

RE: DAX Format () function changes Measures to format text in Power BI

I want the ability to switch a staff report from Head Count to FTE which means switching from whole numbers to decimal numbers. However, the only way to do this at the moment is to use the DAX "FORMAT" function but this changes the measure to text and all the visuals do not display properly.

Niek Verhoef's profile image Profile Picture

d57cb8e8 0972-4d84-9c2d-45c34764db69 on 05 Jul 2020 23:47:53

RE: DAX Format () function changes Measures to format text in Power BI

This would be EXTREMELY helpful. I want my negative #s to be formatted in () ... To do this, I use FORMAT([metric], "$#,##0.00;($#,##0.00)"). But now it's recognized as TEXT and not a numeric value... So I have to create 2 measures of EVERYTHING! One that Power BI recognizes as a number (that I can use for math with other metrics) and another that is formatted properly that I can use in the visual. Either allow the FORMAT function to render numeric OR simply allow "Custom" format of any measure/column (instead of only the predefined formats available). Same goes for Dates (I want "Jan '19" or "Jan-19" but these are not in the predefined list.

Niek Verhoef's profile image Profile Picture

e7de2d47 aea0-4de6-a9f5-80d8b0f759ef on 05 Jul 2020 23:47:21

RE: DAX Format () function changes Measures to format text in Power BI

Totally agree, I use a lot of switch measures to switch between units and value. I can fix the results using the FORMAT () function but then any sorting I have enabled on a table is lost, it appears to a be a rock and hard place situation.