+ Reply to Thread
Results 1 to 4 of 4

Power Query PAth

  1. #1
    Registered User
    Join Date
    04-01-2017
    Location
    Belgium
    MS-Off Ver
    2020
    Posts
    21

    Power Query PAth

    Hi all!

    I'm having problems with the path of an excel query and I'm afraid there is no solution. maybe you can help me.

    Our team works with dropbox, and not with a local server which causes every different user to have a different file location.
    for example :
    C:\Users\Robbe\Dropbox (xxx)\General\01 Operations\19 General File
    C:\Users\Thomas\Dropbox (xxx)\General\01 Operations\19 General File

    Is there any way I could bypass this problem and make my query refresh on a different users computer ?

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Power Query PAth

    I'm not familiar with dropbox, but you can pass variable from sheet to PowerQuery.

    Lets say, you set up named range for single cell in Sheet1!A1, and named it "vUser".

    Go into advanced editor in query editor and add below line right after "let"
    Please Login or Register  to view this content.
    Then you'd edit the source by concatenating path string with User variable.

    Please Login or Register  to view this content.
    EDIT: This example is for querying Excel File, but same principle applies if you query folder etc.

    In addition you can combine it with VBA to automatically update value in the named range.
    Please Login or Register  to view this content.
    Last edited by CK76; 06-01-2017 at 07:53 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    04-01-2017
    Location
    Belgium
    MS-Off Ver
    2020
    Posts
    21

    Re: Power Query PAth

    Thanks for the reply.
    Unfortunately i'm no that great with this!
    If I'd name column "T" in the source file "vUser" what should I write?
    User = Excel.CurrentWorkbook(){[Name="vUser"]}[Content]{0}[Column17], ?

    If I do this it cant find a column named "vUser"

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Power Query PAth

    Couple of things.

    1. Named Range should refer to single cell. (You can have dropdown list in this cell, but only single variable should be passed to PowerQuery)
    2. [Column1] should not change since named range in this set up should have only single column.

+ 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. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  2. SQL -> Power Query SQL
    By happydays886 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2017, 11:56 AM
  3. Power Query From Within VBA
    By rabend in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2016, 07:34 AM
  4. [SOLVED] power query
    By juanda92 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2016, 08:56 AM
  5. VBA and Power Query
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-16-2015, 05:10 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