+ Reply to Thread
Results 1 to 13 of 13

Power query naming columns

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Power query naming columns

    Hi
    Can someone explain why power query alters the way column names are entered.
    I have a spredsheet wthe columns named : Start_date , End_date,

    but when loaded into power query i get

    Please Login or Register  to view this content.
    sometimes its the start that gets the hash and quotes, it can make accessing the columns difficult and I often end up just
    renaming htem a , b , c etc which is not ideal.

    Does anyone have an explanation and how to avoid this.

    Richard.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power query naming columns

    maybe check your column name for spaces in the worksheet

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Power query naming columns

    It depends on the characters in the field name. If you have a space at the beginning or end of the name, you'll get hash and quotes. Also, if there are any characters that are operators in M (eg "-", "*", "/") you'll get hash and quotes.
    Rory

  4. #4
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Re: Power query naming columns

    I Can't really understand it, It's just typed straight into the cell, as I've said sometimes its just easier in power query to rename A , B or somethng.
    I don't knowwhere the space can come form I mean if I typed into a cell " name " , but I'm just select and type name?

    Very odd.

    Richard

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,794

    Re: Power query naming columns

    Well, as we often say, share a workbook and maybe someone can tell you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Re: Power query naming columns

    I will , I just have to recreate a small workbook without a lot of other stuff.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,794

    Re: Power query naming columns

    Okey dokey.

  8. #8
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Re: Power query naming columns

    I've attached a copy of the file the problem occurred in with a lot of stuff removed,

    There are two query folders the second contains a query 'add start date to show #. the others are the files the
    where the problem actually occurred,

    Richard.
    Attached Files Attached Files

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power query naming columns

    here is a problem

    sd.png

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Power query naming columns

    I have opened all of the queries including the one call "add start date to show #" I went to the first step in each query called "Source" to see if there were any quotation marks or hashtags. None appeared. I wonder if you have some corruption in your excel version which may require a re-installation. Just my 2 cents. Others may have a different approach.

    EDIT: I see it now. I think that Sandy has nailed.
    Last edited by alansidman; 09-02-2022 at 11:42 AM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  11. #11
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Re: Power query naming columns

    That sounds possible.

    Richard.

  12. #12
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Re: Power query naming columns

    Hi Sandy,

    Thanks,
    and that' goes to all who had a hand in this.

    Richard.

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power query naming columns

    You are welcome

+ 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. Adding columns to power query
    By JyothiGrace in forum Excel General
    Replies: 4
    Last Post: 01-26-2021, 02:11 AM
  2. [SOLVED] Help with Power Query to Split JSON into Columns
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2020, 09:44 AM
  3. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  4. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  5. [SOLVED] Power Query - update particular columns
    By afgi in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 02-16-2020, 06:41 PM
  6. Custom Permutations Column in Power Query from two columns in the same Query
    By PaintPaddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2019, 02:48 PM
  7. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM

Tags for this Thread

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