Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I can't believe this is not working for me.....
I am creating a new column in Power Query as follows:
= Table.AddColumn(#"Removed Columns", "StpsInclude", each if [OrganisationID] = 29 then false else true)
That creates a column consisting of true and false values - in italics, capitalised and right justified - which seems to indicate they are boolean values. However, the column type is still set to "ABC123" i.e. the General type.
When I try to convert the column to Boolean, as below, I get an error - "DataFormat.Error: We couldn't convert to Binary. Details: TRUE"
= Table.TransformColumnTypes(#"Added Custom",{{"StpsInclude", type binary}})
So I ignored that and went straight to the designer and load the column into a table. When I highlight the column in the FIELDS list, it tells me that the column is Text! And it shows the values as 0 or 1, left justified!
Can anyone tell me what's going on?
I could of course use values other than true and false, but now I'm just annoyed by the whole thing! ![]()
Solved! Go to Solution.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsOr you can convert it to type logical (instead of type binary).
BTW: You can omit the condition in your statement. Just write
Table.AddColumn(#"Removed Columns", "StpsInclude", each [OrganisationID] = 29)
and true and false will be created automagically 😉
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Or you can convert it to type logical (instead of type binary).
BTW: You can omit the condition in your statement. Just write
Table.AddColumn(#"Removed Columns", "StpsInclude", each [OrganisationID] = 29)
and true and false will be created automagically 😉
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
@ImkeF - indeed it does! Neat trick.
Sadly, when you bring the column through onto a table visual, it treats it as Text data type. In Power Query it is shown as an Any data type. So, it converts the data type automagicallywrongly. ![]()
Once I do the explicit conversion to True/False, then it comes through to the table fine.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsRegards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix - thanks very much!!! I got my Binary and True/False mixed up! Rookie mistake.... ![]()
Back to school for me....
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 199 | |
| 125 | |
| 102 | |
| 69 | |
| 53 |