Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
@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
@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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |