Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
waltheed
Impactful Individual
Impactful 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 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. 

Cheers, Edgar Walther
ITsmart BI and Analytics consultant
1 REPLY 1
Anonymous
Not 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.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.