+ Reply to Thread
Results 1 to 3 of 3

Change Column Types programmatically - Power Query

  1. #1
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    295

    Change Column Types programmatically - Power Query

    The attched workbook has a table where I want to change any column that has a "/" in the Header to type Number.

    The Code I have at present is below - however I get an error that says


    Expression.Error: We cannot convert the value "Cty/State" to type Type.
    Details:
    Value=Cty/State
    Type=[Type]]

    What have I done wrong ???


    Thank you

    Allister

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Change Column Types programmatically - Power Query

    Maybe try

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    295

    Re: Change Column Types programmatically - Power Query

    Thanks BoRy

    It works very nicely - allows me to filter my Column Headers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Power Query Parameter Conflict in Types
    By AllisterB in forum Excel General
    Replies: 6
    Last Post: 04-11-2021, 06:20 PM
  2. [SOLVED] Power Query/Power Pivot Conditional Column creation & chart
    By mz_h in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2020, 06:07 PM
  3. Replies: 10
    Last Post: 06-25-2020, 12:19 AM
  4. [SOLVED] Power query change column names
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2020, 04:45 PM
  5. [SOLVED] Power Query Group by Each Change in Column Value
    By ibuhary in forum Excel General
    Replies: 9
    Last Post: 12-15-2019, 04:41 AM
  6. [SOLVED] Power Pivot does not load new column added in Power query
    By ibuhary in forum Excel General
    Replies: 12
    Last Post: 02-19-2019, 03:53 AM
  7. [SOLVED] power query error: we cannot apply operator - to types text and number
    By loganpmgoa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2019, 01:44 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1