Forum Discussion

basrooz's avatar
basrooz
Advocate I
4 years ago

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