Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
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 posts I see suggestions like "Yes";"Yes";"No" but these do not work. And what do the three options mean? I cannot find any documentation for this. At least not here... Use custom format strings in Power BI Desktop - Power BI | Microsoft Learn
It would be awesome to have this working, so you can do variants like this:
"Has attachment";"Unknown"; "No attachment"
"Overdue";;"In time"
Many thanks.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |