How to Rename Column Headings with Power Query - the quick automated way

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 73

  • @sarahciez2434
    @sarahciez2434 29 วันที่ผ่านมา +1

    This was the clearest explanation I could find, thank you so much!

    • @AccessAnalytic
      @AccessAnalytic  29 วันที่ผ่านมา

      You're welcome, thanks for taking the time to let me know 😀

  • @HungLe-pk3oz
    @HungLe-pk3oz 6 หลายเดือนก่อน +3

    I've watched many related videos but the way you explain is way more clear and simple. Thank you so so much

    • @AccessAnalytic
      @AccessAnalytic  6 หลายเดือนก่อน

      No worries, thanks for taking the time to leave a kind comment

    • @dirkstaszak4838
      @dirkstaszak4838 2 หลายเดือนก่อน

      what would be the short cut for a German Excel Verison?

    • @AccessAnalytic
      @AccessAnalytic  2 หลายเดือนก่อน

      I don’t know sorry

  • @God......4579
    @God......4579 3 หลายเดือนก่อน +1

    Very informative! Love the clear explanation. 🙏🏿

    • @AccessAnalytic
      @AccessAnalytic  3 หลายเดือนก่อน

      I appreciate you taking the time to let me know you found it useful

  • @Rodrigo-j6o7x
    @Rodrigo-j6o7x 3 หลายเดือนก่อน +1

    Nice video and tips... "shift + 9", I'll only add that the concept behind is: mark the text and "open whatever bracket you need", then you'll have the seleted text with both ( ), { }, [ ].

  • @rodolfoflores4387
    @rodolfoflores4387 19 วันที่ผ่านมา +1

    Excellent technique, as always.

  • @GeertDelmulle
    @GeertDelmulle ปีที่แล้ว +10

    Hi Wyn,
    Here's a one step solution that gets straight to the point. In your rename step use this formula:
    = Table.TransformColumnNames(Source, each Text.AfterDelimiter(_,"_"))
    and be done with it. 🙂
    You're welcome.

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว +1

      Nice Geert

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว

      I added it to the description section

    • @txreal2
      @txreal2 ปีที่แล้ว

      Where is the time stamp for this step? Thanks Geert

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว +1

      @@txreal21:21

    • @marcelakarinalopezortiz3373
      @marcelakarinalopezortiz3373 ปีที่แล้ว

      @@AccessAnalytic do you have a similar solution when you want to add a prefix/suffix?

  • @alexbarbucristi
    @alexbarbucristi ปีที่แล้ว +2

    Hi Wyn,
    My approach was: Use Headers as first Row, Transpose, Apply transformations needed to column 1 which contains the names of the original columns. Transpose, Use first row was headers

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว +2

      Nice technique with a small data set. Not sure what would happen with 500,000+ rows

    • @alexbarbucristi
      @alexbarbucristi ปีที่แล้ว

      @@AccessAnalytic Thanks for the heads up, will stop using it

  • @radu_sirbu
    @radu_sirbu ปีที่แล้ว +1

    That's a lifesaver! It's exactly what I need for my current task at work.

  • @mcwahaab
    @mcwahaab ปีที่แล้ว +1

    Awsome! I have seen other long approaches but this is the one. Thanks a lot Wyn

  • @paulsingleton6071
    @paulsingleton6071 8 หลายเดือนก่อน +1

    Hi Wyn, great video, really useful. Thank you. 👍👏

  • @RahulForPWBI
    @RahulForPWBI 4 หลายเดือนก่อน +1

    Easy Peasy; Thank You so much!

  • @erdiaz39
    @erdiaz39 ปีที่แล้ว +1

    Awesome tips!!!

  • @josecarlosconejo5724
    @josecarlosconejo5724 ปีที่แล้ว +1

    Very Useful 😮 Impressive 👏

  • @zahoorsarbandi2982
    @zahoorsarbandi2982 ปีที่แล้ว +7

    very nice lecture specially: Shift+Down Arrow selects the step name, then Shift+9... wonderful

  • @rudi-gruber
    @rudi-gruber ปีที่แล้ว +1

    very helpful, thanks

  • @felipesignorellireis7839
    @felipesignorellireis7839 ปีที่แล้ว +2

    Love it

  • @telclissonperes
    @telclissonperes ปีที่แล้ว +1

    Thank you so much!!!!

  • @MaiMai01-w4k
    @MaiMai01-w4k 6 หลายเดือนก่อน +1

    Excellent

  • @dbalkin777
    @dbalkin777 ปีที่แล้ว

    Great video! Related to your “clicks” comment, how much M do you write in your work now? I feel like I’ve reached a place with PQ that that is what I should focus on now, but seldom feel like I have a use case that can’t be solved with the “clicks.”

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว

      Thanks, probably 10% on average is hand written code

  • @BobXu-i7v
    @BobXu-i7v 3 หลายเดือนก่อน +1

    awesome!

  • @kalyanreddy6260
    @kalyanreddy6260 5 หลายเดือนก่อน

    Still getting error. I jave two tables 2022sales, 2023 sales. In first file i have columns carname, year, number of units
    sold, country. In secnd file i have diffent name number of units as (units) and county as (place) . Ihave created maping tabme exactly and turn it to rows and using in my sample file query. Now the second still shows error not displaying records.a red line across all headers. All date types are checked though

    • @AccessAnalytic
      @AccessAnalytic  5 หลายเดือนก่อน

      If you’re running this on a folder of files then you might want to add MissingField.Ignore
      Something like
      Table.RenameColumns(_,{{"Product","Item"}}, MissingField.Ignore)
      This should handle the fact that the columns you’re renaming don’t exist on one file

  • @danishnawaz3651
    @danishnawaz3651 8 หลายเดือนก่อน

    Sir, plz make video for below.
    If
    1 table has 9 column,
    2 table has 10
    and 3 table has 8 .
    Then how can we make equal all column for all table.. like we want to insert dummy column for missing column in tables and make equal like 10 column for each table.

    • @AccessAnalytic
      @AccessAnalytic  8 หลายเดือนก่อน

      That should happen automatically. Tables don’t need the same number of columns

  • @Mohammad-rz7oj
    @Mohammad-rz7oj 4 หลายเดือนก่อน

    I have spreadsheet with new and old columns names. I see there are lot of steps in video. Could you please let me know how to rename the columns in the table using the spreadsheet. I tried few steps what you showed in the video. getting error like cannot convert a value of type table to type list.

    • @Mohammad-rz7oj
      @Mohammad-rz7oj 4 หลายเดือนก่อน

      Sorry it is working now. Just small doubt, could you please let me know whether we can get rid of spreadsheet once we rename the fields so that we dont have any dependency on the spreadsheet

    • @AccessAnalytic
      @AccessAnalytic  4 หลายเดือนก่อน

      @Mohammad-rz7oj the Power Query code pulls the data from a source and loads it to a destination. If you never to update or refresh the query then yes you can delete the source.

    • @Mohammad-rz7oj
      @Mohammad-rz7oj 4 หลายเดือนก่อน

      @@AccessAnalytic Thanks for the reply. All these calculations are not working for directquery. What i did instead is wrote a calculation in excel to concatenate old and new column names and updated those in M Lang in Powerquery editor.

  • @PeterWalker
    @PeterWalker ปีที่แล้ว

    How would you handle the error that the field name already exists in the record? I have that error and although I can tell the rename function how to handle missing values there isn't anything tat will say this is what to do when you have an existing name.

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว +1

      Not sure, maybe some sort of pre check on the renaming table and add a 2 if text already exists
      if List.Contains( Table.ColumnNames(OriginalTable), [NewName] ) then [NewName] & "2" else [NewName]

    • @PeterWalker
      @PeterWalker ปีที่แล้ว +1

      @@AccessAnalytic sounds like a course of action. Thanks for the response!

  • @AndrewCragg-y8v
    @AndrewCragg-y8v 2 หลายเดือนก่อน

    I keep getting We expected a RenameOperations value error.... :(

  • @ajayrathod7777
    @ajayrathod7777 2 หลายเดือนก่อน

    Will this approach work if i unpivot data? And download link is not working

    • @AccessAnalytic
      @AccessAnalytic  2 หลายเดือนก่อน

      You can’t use button clicks on user interface if connection to data isn’t working.
      Unpivotting is a good technique to avoid referring to columns

  • @exceltina
    @exceltina 7 หลายเดือนก่อน

    When I refresh query once i get a new file, will it read the data?

  • @bembeyerenkhoma
    @bembeyerenkhoma ปีที่แล้ว

    I have a question based on the power query how can I get in touch with you? Do you have an email address or any other means of communication apart from this platform?

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว

      Check out the description for my links, also for most questions I point folks to techcommunity.microsoft.com/t5/microsoft-excel/ct-p/Excel_Cat?WT.mc_id=M365-MVP-5002589
      And
      community.powerbi.com/t5/Power-Query/bd-p/power-bi-services

  • @FredericLEGUEN-Excel
    @FredericLEGUEN-Excel ปีที่แล้ว +2

    Nice trick. And I love Shit + 9 😉

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว

      Cheers Frédéric

    • @GrainneDuggan_Excel
      @GrainneDuggan_Excel ปีที่แล้ว +1

      Fantastic timesaver and frustration remover! Wish I knew Shift+9 sooner! Thanks Wyn!!!!!! 👏👏👏👏👏👏

    • @mcnater
      @mcnater ปีที่แล้ว

      @@GrainneDuggan_Excel what does Shift + 9 do?

    • @GrainneDuggan_Excel
      @GrainneDuggan_Excel ปีที่แล้ว +2

      @@mcnater watch at about 2:35 min when you type a function name then Shift+Down Arrow selects the step name, then Shift+9 puts the (before and )after!!

    • @AccessAnalytic
      @AccessAnalytic  ปีที่แล้ว +1

      Thanks Grainne, i wish I knew it sooner too 😆