Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
basrooz
Advocate I
Advocate I

Format affects measure

Hi,

I have a measure with a switch function. In some cases it returns a percentage, in other cases it returns an absolute value. I used the FORMAT function in DAX to either return the result as a percentage or an absolute number.

 

This however means that the output is not a numeric value anymore, but a text value, as I have to add the '%' sign in the FORMAT function. I can therefore not use the output as an input for calculations in other measures, plus conditional formatting won't work.

I work with the PowerBI version from January 2022 which is installed on a server where no other tools can be installed, so Tabular Editor is not an option. 

 

Does anyone have a good workaround for this? For conditional formatting I could create a duplicate of the measure without formatting, but the real problem is that I want to refer to this measure from other measures.

 

Best regards

Bas

2 REPLIES 2
basrooz
Advocate I
Advocate I

@amitchandak that won't work. You cannot change the format, it always reverts back to Text. Plus in that pane you can only select that it's either a percentage or an absolute number. I want the measure to dynamically switch between a percentage and an absolute number as an outcome.

 

Thanks

Bas

amitchandak
Super User
Super User

@basrooz , In the measure tool or under data model -> property pane: give a format of your choice and try

 

https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.