Forum Discussion

SupritDecipher's avatar
SupritDecipher
Frequent Visitor
9 months ago
Solved

Actually I want same custom column I want a write using DAX is it possible ..?? #powerquery

 
  • PhilipTreacy's avatar
    PhilipTreacy
    9 months ago

    HI SupritDecipher 

     

    You may feel you are explaining things clearly but you are not.  Posting an image and the error message 'DataFormat.Error: We couldn't convert to Number.'  doesn't help us to understand what data you are using and what you are trying to do with it.

     

    The error message clearly explains that you are trying to convert something to a number (text?) but that didn't succeed.

     

    Exactly why that has happened will be much easier to work out if you provide the data you are using and show the operation/code/function you are applying to that data to generate that error.

     

    Your initial image shows a column with numbers and text.  As has been explained, you can't mix data types in a column.  So if you have any text, the whole column is text.

     

    In the latest image, I can see that the column is decimal and the first row is an error so I'm guessing you are trying to convert text (letters) to decimal, which of course won't work.

     

    So you are going to have to convert the entire column to text if you want to keep words Improving and Devaluing in the column along with numbers (which will be stored as text) like -0.09312

     

    Now I think you have asked how can you create the same column using DAX?  Well, if you have the data in Power Query, you just convert the column to text then Close & Load to Power BI and the column is available.  No need to use DAX to create the column.

     

    If you now want to use the numeric values in the column to do some math operations with, that's a different question and one you will need to explain clearly so we know exactly what it is you are trying to do.

     

    Regards

     

    Phil