Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

If function with a text column and a mixed column with both text and number

Hi Everyone, I have two columns, column A = "Yes" and "No" values, all text Column B = numbers (1,5,10,16,20 & "n/a" & "cohort error") thus column B contains both numbers and text and PowerBi clas...
  • Thim's avatar
    7 years ago

    You could use this Dax function to make a new column.

    IFERROR(VALUE(Table2[Column B]);1000000)

     

    This will change all text values and errors to 1.000.000. (Feel free to chose another number, but it does have the be a number)

     

    Then use the new column as replacement for the column B in your formula.

     

    If you don't want a new column, you can type it all in one Formula.

    IF(Table2[Column A]="No" && IFERROR(VALUE(Table2[Column B]);1000000)<5;"Yes";"No")

     

    Hope this will help. :-)