locked
Importing CSV Files using Power Query via Relative Path RRS feed

  • Question

  • Hi All,

    Is there any way i can change the path of CSV files to be imported  dynamically .  Currently I have a folder that contains some CSV files which i imported[ Connection Only]  in a excel sheet. Is there any way so that for User 1 the Excel File ( Template) picks CSV files from Folder 1 and For User 2 It picks the CSV files from Folder 2 .

    Adil


    ADIL

    Wednesday, August 3, 2016 10:17 AM

Answers

  • Hi Adil. You can do this in Power BI Desktop using the Query Parameters feature. In Excel, you can mimic this functionality by pulling the folder path from a cell in Excel (which users can update), and referencing this path value in your CSV query. For examples of how to do this, just search for "Power Query parameters" and you'll see quite a few blog posts from folks who figured out ways to do this before the Query Parameters feature was a part of PBIDesktop.

    Ehren

    Wednesday, August 3, 2016 5:58 PM

All replies

  • Hi Adil. You can do this in Power BI Desktop using the Query Parameters feature. In Excel, you can mimic this functionality by pulling the folder path from a cell in Excel (which users can update), and referencing this path value in your CSV query. For examples of how to do this, just search for "Power Query parameters" and you'll see quite a few blog posts from folks who figured out ways to do this before the Query Parameters feature was a part of PBIDesktop.

    Ehren

    Wednesday, August 3, 2016 5:58 PM
  • Hi Ehren, I'm really having difficulties finding dynamic path solution for CSV query, could you send me a link to the best answer?

    Kind regards.

    German

    Tuesday, August 29, 2017 5:43 PM
  • Hi German. Can you elaborate on what issues you're running into? Are you having trouble with the M syntax, getting refresh in Power BI to work, or something else?

    Ehren

    Tuesday, August 29, 2017 6:02 PM