+ Reply to Thread
Results 1 to 4 of 4

PowerQuery reference cell value

  1. #1
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    PowerQuery reference cell value

    Hello

    How do I reference a cell value and use that value in PowerQuery?

    Example, lets say I have a workbook in C:\ExcelFiles\ that is used as a source in PowerQuery, like this:
    pq1.png


    I have that value "C:\ExcelFiles\" in a cell, in this case in E2:
    sourcefolder.png

    I would like to change the blue text in the first screenshot, ie "C:\ExcelFiles\" to use the value in E5 instead.

    How can this be accomplished?
    Attached Files Attached Files

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

    Re: PowerQuery reference cell value

    You'll need to create a parameter from the cell with the source data. Have a look here: https://community.powerbi.com/t5/Des...er/td-p/395121
    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.

  3. #3
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Re: PowerQuery reference cell value

    Thanks for the answer AliGW

    I could not get it to work with the Parameter solution you posted, and I also found some other solutions on the net, that supposedly should do the same, but all of them failed.

    Until I stumbled upon this post, where the reason for all the fails is mentioned: https://accessanalytic.com.au/powerq...ls_parameters/
    It says: For this to work you will need to change your privacy settings to “Ignore”, via Query Options > Privacy > Always ignore Privacy Level settings

    After I changed that setting, it works (though not sure what security risks that now involves)

    Anyhow, thanks again

  4. #4
    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,719

    Re: PowerQuery reference cell value

    Good to know - thanks for letting us know.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Converting a row into a column using PowerQuery
    By heytherejem in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2018, 09:01 AM
  2. cell loses #REF with PowerQuery (Get & Transform)
    By sick stigma in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-16-2018, 09:57 AM
  3. PowerQuery Many 2 Many Relationships
    By rabbit_post in forum Excel General
    Replies: 1
    Last Post: 02-01-2018, 05:17 PM
  4. Unpivot with PowerQuery possible?
    By nobodyukno in forum Excel General
    Replies: 3
    Last Post: 08-23-2017, 03:34 PM
  5. VBA vs PowerQuery
    By Trachr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2017, 11:50 PM
  6. PowerQuery and VBA
    By Trachr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2017, 12:10 AM
  7. Help with powerquery.
    By stephme55 in forum Excel General
    Replies: 0
    Last Post: 09-01-2016, 07:31 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