Consulting

Results 1 to 2 of 2

Thread: Transform data type in column

  1. #1
    VBAX Newbie
    Joined
    Sep 2019
    Posts
    2
    Location

    Transform data type in column

    Hello,

    I am retrieving data through Power Query from an Oracle DB live to an Excel workbook. In PQ, under the "Transform" tab, there is a function to change the data type of a column, that I use to get all the decimal numbers displayed. In the M-code the function is called TransformColumnTypes. However I have some strings in the data that I cannot change to decimal number and produce an error. Is there a way to exclude these? Because the function takes the whole column at the moment.

    Pictures provided before / after applying function for clarification.PQ_Change_1.jpgPQ_Change_2.jpgPQ_Change_3.jpg

    Thanks!

  2. #2
    If you want to set the column as numbers it -by definition- cannot contain anything that isn't a number, so there is no way to both set a column to numbers AND have that column retain anything that isn't a number. But perhaps this post helps you to find a solution: https://blog.gbrueckl.at/2013/12/err...n-power-query/
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •