+ Reply to Thread
Results 1 to 7 of 7

Power query web link ?

  1. #1
    Registered User
    Join Date
    10-23-2018
    Location
    New York
    MS-Off Ver
    10
    Posts
    27

    Power query web link ?

    I have a query that links to a website and pulls data. Every seven days two of the columns change as below:

    MONDAY2 to MONDAY3
    TUESDAY2 to TUESDAY3

    I get errors when I refresh. Is there a way to automate this so it adjusts without errors? THanks.

  2. #2
    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,908

    Re: Power query web link ?

    Isn't this the same question you posted half an hour ago here: https://www.excelforum.com/excel-pro...ata-pull.html?
    Rory

  3. #3
    Registered User
    Join Date
    10-23-2018
    Location
    New York
    MS-Off Ver
    10
    Posts
    27

    Re: Power query web link ?

    yes. I am new here and when I checked my first post it wasnt showing up.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Power query web link ?

    Not nearly enough detail to help you.

    Each web site requires different treatment or custom steps to extract info.

    But chances are, that column name change caused error somewhere in your query step. Go into query editor and see at which of the applied steps that error is produced.

    Then, add a logic and/or custom function to avoid this error.

    Such as using Table.ColumnNames function etc.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  5. #5
    Registered User
    Join Date
    10-23-2018
    Location
    New York
    MS-Off Ver
    10
    Posts
    27

    Re: Power query web link ?

    The website I am using just pulls the data in flawlessly for a week when the column is MONDAY2. When the next Monday rolls around the column name changes to MONDAY3 and I get an error because it is looking for MONDAY2 (that is where the error is occuring halting the data pull). I am just starting with Power Query so wanted to know if there is a simple fix to automate this.

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Power query web link ?

    Right, so instead of using Column Names, you need to use Column positions.

    In order to do that, you'd use Table.ColumnNames() function to obtain list of column names. Then use row index to obtain column name(s).
    Then use result as is, or in a variable to replace column names that are are hard coded in the query editor with dynamic name.

    Ex:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-23-2018
    Location
    New York
    MS-Off Ver
    10
    Posts
    27

    Re: Power query web link ?

    Thanks for your help.

+ 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. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 04:09 PM
  2. Power Query and Power Pivot Table
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 06:17 AM
  3. Power Query and Power Pivot Table !!
    By haitham.shop in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2018, 06:15 AM
  4. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Access Tables & Databases
    Replies: 0
    Last Post: 08-06-2018, 05:59 AM
  5. 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
  6. Replies: 0
    Last Post: 04-05-2018, 01:16 AM
  7. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM

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