Forum Discussion
COIL-ibesmond
2 years agoHelper I
DAX FORMAT function Alternative - Switch Statement
I'm trying to build a switch statement, but I'm running into a formatting problem. I'm using FORMAT(ActualVsBudgetPerc, "Percent" ) but this turns my value into a string which I want to avoid bec...
- 2 years ago
Under such scenario, I usually create two measures, one that only returns numeric data types and other one with format applied for display purpose just like an Elephant, one set for display teeth and another real set for chewing. 😄
lbendlin
2 years agoSuper User
have you considered using the built-in implicit formatting in Power BI?
- COIL-ibesmond2 years agoHelper I
Yes, I cannot format the entire measure because some values are dollar amounts and some are percentages. The measure calculates a row using the switch statement above.
- lbendlin2 years agoSuper User
ah, that's an important piece of information.
Enably Dynamic Measure Formatting and learn how to use it.
Create dynamic format strings for measures in Power BI Desktop - Power BI | Microsoft Learn
- COIL-ibesmond2 years agoHelper I
Tried this, but wouldn't work. Appreciate the response.