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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mauropasi
Advocate I
Advocate I

int being cast to boolean and incorrectly transformed back to int

Hi everybody. 

I am connecting to an MySQL database and I have a column being picked up by Power BI as boolean even though it is int.

I know that this happens because power query is only looking at the first x (200?) rows of data.

What I have always done to fix this is just transforming the type to int but for some reason is doesn't seem to fix it this time. I only get 0s and 1s. It's like it is actually converting the values instead of folding the query correctly and getting them as int in the first place.

If I force the type casting with cast() in the SQL query it works for me but then I introduce a block for following query foldings which I am not sure it is what I want to do.

Is there any way to force power bi to look at more rows or to make sure that the transformation is successful.

1 ACCEPTED SOLUTION

There is a 

TreatTinyAsBoolean = false

which seems to be what I am looking for. I just need to figure out how to use it and what effects it will have on query folding.

View solution in original post

3 REPLIES 3
mauropasi
Advocate I
Advocate I

it may have something to do with the schema being wrong in the first place but I would still like to do something about it.

There is a 

TreatTinyAsBoolean = false

which seems to be what I am looking for. I just need to figure out how to use it and what effects it will have on query folding.

How i can running that code?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.