Forum Discussion
Anonymous
7 years agoNot applicable
Boolean puzzle in Power Query
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 f...
- 7 years agoHi Anonymous
A true or false column is a bolean value as you say so on query editor you need change your true pr false by 1 or 0 then convert it to true or false should work.
Regards
MFelix - 7 years ago
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 ;)
ImkeF
7 years agoCommunity Champion
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 ;)
- Anonymous7 years agoNot applicable
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. :smileyhappy:
Once I do the explicit conversion to True/False, then it comes through to the table fine.