Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

True / False seen as Text Column - DAX Help!!!!

In my dataset, I have added an additional column that ouputs True, False or (blank).  Upon import, PBI sees it as text and I can't convert it to True/False in either Query Editor or in Data (left-rail).

 

The end goal is to write a DAX statement that interprets the value of True as "Complete" or False as "Incomplete".

 

When I add a function like:

 

Column 2 = IF('KPI Dashboard AD'[(Campaign) Creative Concierge]=True(),"Complete","False"

)

 

I get the following result:

 

DAX comparison operations do not support comparing values of type Text with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values.

 

Not sure what to do here...

8 Replies

  • tjd's avatar
    tjd
    Impactful Individual

    In the data view, use the Modeling ribbon and select "Data Type" and change the column to True/False.

    • Anonymous's avatar
      Anonymous
      Not applicable

      tjd

       

      Thanks for the feedback.

       

      When I change the Data Type I receive this window:

       

       

      And then I receive an error message that "We can't automatically cvonvert the column to True/False type.

       

      Any thoughts.

      • tjd's avatar
        tjd
        Impactful Individual

        Does the column currently say "0" or "1" or "True"/"False"?  I believe that it has to be in 0/1 format to change to True/False.  What's 0 (True) depends on the question being asked in the column - e.g, if column heading is "Is Current?", then 0 would be true and 1 would be false.