Forum Discussion

jaykilleen's avatar
jaykilleen
Advocate II
9 years ago
Solved

Convert Integer to Logical

PowerBI seems to have a hard time converting "1" and "0" to TRUE and FALSE.

 

Is the best way here to convert to Whole Number first then add another step to convert to True/False??

 

 

Expression.Error: We couldn't convert to Logical.
Details:
    1
  • Anonymous's avatar
    Anonymous
    9 years ago

    Either through Power Query or DAX i'd make another column.  The formula would just be [Value] = 1.  That way if [Value] is 0, you will get a false, and if it is 1 you will get a true.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Either through Power Query or DAX i'd make another column.  The formula would just be [Value] = 1.  That way if [Value] is 0, you will get a false, and if it is 1 you will get a true.

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Community Support

    jaykilleen,

     

    I agree with the comment above. You could also nest type transformation in one step by using Advanced Editor.