Power BI & Excel Power PivotKansas City

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Best way to take a text field and make it a numeric

  • 1.  Best way to take a text field and make it a numeric

    Posted Sep 02, 2020 10:14 AM
    I am having an issue with taking a text field that has a numeric value in it, I need to put this value into a numeric field so I can do calculations on it.
    What would be the best way to do this?
    Thank you,
    Jim

    ------------------------------
    Jim Rubino
    Tension Envelope
    Kansas City MO
    8162831424
    ------------------------------


  • 2.  RE: Best way to take a text field and make it a numeric

    Silver Contributor
    Posted Sep 02, 2020 11:51 AM

    Hi Jim,

    In Power Query, you can convert the field to a number, or add a column that is numeric.
    That's your best bet. Make sure that the field has the correct data storage at the source.

    In DAX, you could also add a calculated column = VALUE( table[text column] ).

    This will get the field in as a text column. But, avoid this if you can because you'll be storing the data twice in your model, and won't get the full benefit of in-memory compression. 



    ------------------------------
    Fred Kaffenberger
    Business Analyst
    Overland Park
    913-738-4450
    ------------------------------