Forum Discussion
waltheed
2 years agoImpactful Individual
What is a valid custom format string for boolean data types?
Hi, What is a valid custom format string for boolean data types in Power BI? This property is visible when you use Tabular Editor to manage your datamodel (I mean semantic model :-)). In internet...
Anonymous
2 years agoNot applicable
Hi waltheed ,
Custom format strings are used to define how data is displayed in Power BI, and when it comes to boolean values, Power BI does not provide direct custom format strings like it does for numeric or date formats. However, you can achieve the desired result by using DAX expressions to convert boolean values into text based on the conditions you specify.
You could create a measure or a calculated column that displays your custom text for boolean values:
Custom Boolean Format =
SWITCH(
TRUE(),
[YourBooleanField] = TRUE(), "Yes", // or "Has attachment", "Overdue", etc.
[YourBooleanField] = FALSE(), "No", // or "No attachment", "In time", etc.
"Unknown" // This is the default or "else" case
)
Replace `[YourBooleanField]` with your actual boolean field name.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.