New column based on mixed number/text column

72 views Asked by At

I have a column column1 in powerbi where the majority of rows are Numeric and the minority is Text.

How can I calculate column1 multiplied by another column columnX in a new column, while ignoring rows where column1 is Text. The new column should contain Blank for these rows.

I am using the DirectQuery method so I can't change the data type of column1.

1

There are 1 answers

0
Peter On

Here you go.

Product =
IF (
    ISERROR ( VALUE ( 'Table'[Column1] ) ),
    BLANK (),
    VALUE ( 'Table'[Column1] ) * 'Table'[ColumnX]
)