Forum Discussion

sureshdam18's avatar
sureshdam18
Frequent Visitor
8 years ago
Solved

Expressions that yield variant data-type cannot be used to define calculated columns.

Hi, i am new to Power Bi. while using the IF Statement, i am getting an error like this yield variant data-type cannot be used to define calculated columns  Calculation is: IF(AND([Completion Statu...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi sureshdam18,

     

    I think you are try to use both number value and text value in one calculate column so power bi can't auto analysis data type of this calculated column.

     

    Maybe you can try to use 0 to replace "" part to keep similar data type or modify the column type to text.

    Column=
    IF (
        AND ( [Completion Status] = "Open", [Status] = "MD Ops Review - Delete" ),
        Sheet1[NET_DAY],
        0
    )

     

    Regards,

    Xiaoxin Sheng