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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Leighla00
Frequent Visitor

Cannot Create Percentage off of True/False Data

I'm trying to create a calculation that will output a percentage based off of true/false data.

 

Leighla00_0-1737638301484.png

 

Leighla00_1-1737638394421.png

 

Completion Rate =

CALCULATE(COUNT('2024'[Status]),'2024'[In Arbitration?]=TRUE())

 

"Dax comparison operations do not support comparing values of type text with values of type true/false. Consider using the value or format function to convert one of the values."

 

I am getting the above error, but I have checked both the data type and format for the column, and they both say "True/False". None of them say "Text". I don't know what to do.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Leighla00 ,

 

You're trying to use the function version of TRUE(), rather than a scalar value.

Try changing to this:

CALCULATE(
    COUNT('2024'[Status]),
    '2024'[In Arbitration?] = 1
)

 

Boolean values True/False are just the integers 1/0 in the background.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
v-tsaipranay
Community Support
Community Support

Hi @Leighla00 ,

 

Thank you for reaching out to the Microsoft fabric community forum. regarding the issue your a facing to create a percentage of True/False data.

 

As @BA_Pete already mentioned, please try using the suggested solution. And also it appears that you have found a resolution. If so, kindly mark the helpful reply and accept it as the solution. This will assist other community members in resolving similar issues more efficiently. Feel free to contact us if you have any further questions.

 

Thank you.

 

 

 

 

 

PwerQueryKees
Super User
Super User

Have you tried removing the =TRUE() altogether?

Someone at my organization helped me.

 

CALCULATE (COUNTROWS (tablename), FILTER (tablename, tablename[Status] = in progress)).

 

Thanks for trying.

BA_Pete
Super User
Super User

Hi @Leighla00 ,

 

You're trying to use the function version of TRUE(), rather than a scalar value.

Try changing to this:

CALCULATE(
    COUNT('2024'[Status]),
    '2024'[In Arbitration?] = 1
)

 

Boolean values True/False are just the integers 1/0 in the background.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors