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
Anonymous
Not applicable

Error Cannot convert value of type Text to type True/False.

Hi!

 

I'm try to use "countifs" excel funciont in PowerBi.

 

I used this: 

Concluído? = Calculate(
COUNTROWS(BASE_PEDIDO),
BASE_PEDIDO[STATUS] = "CONCLUIDO", BASE_PEDIDO[ID_ATENDIMENTO])

But the Power Bi return this erro "Cannot convert value 'XXXXX' of type Text to type True/False."

Can anyone help me?

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description, I think you can check the type of the column ‘BASE_PEDIDO[ID_ATENDIMENTO]’.

Like this:

v-janeyg-msft_0-1603416143768.png

If the column isn’t logical type , it can’t be used directly in calculate expression. You can try BASE_PEDIDO[ID_ATENDIMENTO] = "XXXX".

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description, I think you can check the type of the column ‘BASE_PEDIDO[ID_ATENDIMENTO]’.

Like this:

v-janeyg-msft_0-1603416143768.png

If the column isn’t logical type , it can’t be used directly in calculate expression. You can try BASE_PEDIDO[ID_ATENDIMENTO] = "XXXX".

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

What is "ID_ATENDIMENTO"?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Anonymous , Either you should check the value for BASE_PEDIDO[ID_ATENDIMENTO]  or remove it

 

Concluído? = Calculate(
COUNTROWS(BASE_PEDIDO),
BASE_PEDIDO[STATUS] = "CONCLUIDO", BASE_PEDIDO[ID_ATENDIMENTO] = "??")

 

or

 

Concluído? = Calculate(
COUNTROWS(BASE_PEDIDO),
BASE_PEDIDO[STATUS] = "CONCLUIDO")

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi!

 

Sorry, this is the name of my column.

 

 

 

Hi,

If that is a column, then you must give a criteria such as BASE_PEDIDO[ID_ATENDIMENTO]="XYZ"


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.