Forum Discussion

MauricioHV's avatar
MauricioHV
New Member
1 year ago
Solved

Matrix with text and numbers

I have a Matrix like this. The original table was unpivot, so the plot values are coming for the final unpivot column "Value". However, in this column I have mixed text and numbers (the l...
  • danextian's avatar
    1 year ago

    Hi MauricioHV 

     

    You cannot maintain the number format of a column if any of its value is non-number. Number + Number = Number while Number + Text =Text. What you can do is create a custom column in the query editor that returns only the rows that are numbers. Example

    // Attempt to convert [text_number column] to a number; return null if conversion fails
    try Number.From([text_number column]) otherwise null