Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

How to replace Data Source for existing report?

how can i replace data source for existing report?

  • Anonymous In power bi desktop go to query editor, select your table and on the right hand side under Applied Steps click settings icon. You can also without going to query editor - go to File -> Options and settings -> Data source settings >Right click data sources and chnage source.

     

  • go into Edit Queries.  Find the table/query you want to change.  Go to the first step in the Query (always called Source) and change it there.

46 Replies

  • ankitpatira's avatar
    ankitpatira
    Community Champion

    Anonymous In power bi desktop go to query editor, select your table and on the right hand side under Applied Steps click settings icon. You can also without going to query editor - go to File -> Options and settings -> Data source settings >Right click data sources and chnage source.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      the "change source" is grey for me.

      • rblackford's avatar
        rblackford
        Advocate II

        Grey for me as well, I don't think this should be marked as "Solved".

    • chfio's avatar
      chfio
      Regular Visitor

      Hi.

      I am trying to change my source from local tsv to a url tsv. 

      I see in editing source i can change the file but it seems I'm not able to change to a URL (as I am able in the initial get data window).

       

      *not able to download too large for HD

      *Recreating the query and subsequent table edits would be .. not ideal.

      = really hoping to seamlessly point the existing steps + report to a URL source instead of current local file upload:)

       

      • BastiaanBos's avatar
        BastiaanBos
        Regular Visitor

        Did you find a solution for your issue ? I'm trying to edit the source from a TEST environment Odata source to a PROD environment Odata. 

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Ankit. There's a detail I want to confirm. I have 8 different tables in my report, all of which have storage mode as DirectQuery. So my question is - if I change the Data source using File Menu --> Data Source Settings, will the change apply to ALL the DirectQueries ?

       

      P.S. : If it helps, I am simply trying to change the source DB from UAT to Production.

  • HI Gurus,

     

    I have one report which is developed using Excel now I want to switch from Excel to MS-SQL. How can I replace the source as the steps suggested below is only for the same source. What about the cross data bases like Excel and SQL.

  • sanjupanda's avatar
    sanjupanda
    Regular Visitor

    How to replace the data source of the report when we move from one environment to the other (e.g:  from Dev to Test) ?

    • Shelley's avatar
      Shelley
      Post Prodigy

      Hi, Are the field names the same? If so, what I've done to make this easier and it seemed to work, is:

      1. In Edit Queries, I added the new source table.

      2. Then I clicked on the new source table, and then clicked Advanced Editor.

      3. In the new source's Advanced Editor pane, I copied the commands with CTRL-C. Clicked Done.

      4. Then I clicked on the old table, and clicked on Advanced Editor, selecting all the commands here, and then pasted the new source information using CTRL-V.

      5. When you apply the changes, this should point your old query to the new source, and you should actually be able to delete the new table you added as it will now appear twice.

      Please NOTE: you have to take care here if you performed any transformations. You may have to repeat them or edit the commands accordingly.

      I hope this helps. Everyone's situtation and environment is different, so perhaps this may or may not work for you.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Created an account just to reply to this. Amazing! Worked like a charm.

  • Anonymous's avatar
    Anonymous
    Not applicable

    it's actually the same file but saved under difference place, how can i change/replace data source for current report?

    • MattAllington's avatar
      MattAllington
      Community Champion

      go into Edit Queries.  Find the table/query you want to change.  Go to the first step in the Query (always called Source) and change it there.

      • RitaPT's avatar
        RitaPT
        Frequent Visitor

        Someone change the name in table that I import from a database. I tried the option that you mentioned but this only function from Browser. Do you know if it is possible to change the source inside a document - similar to function "Edit Links" from excel?

        Thank you.

  • anandmarsh's avatar
    anandmarsh
    Regular Visitor

    Hi,

     

    Simply, I want to have one PowerBI template that I can apply to multiple excel files and multiple sheets (i.e. excel files are the same except for sheet names and file names).

     

    This does not work smoothly.

     

    I have created a template with all the required queries and applied steps (i.e. remove rows, make row as column heading, change some collumn headings).

     

    The issue arrises when I try to change the data source. There are a errors that arise and I cant seem to resolve them. Also, when i select the new data source the sheet name fails to change. (i.e. i change the "Source" and i change the "Navigation" to the correct sheet, however the sheet name on the left hand side of the screen does not update to reflect newly-selected sheet.)

     

    Is the creation of a template and workflow (i.e. "applied steps") the right way to go about applying the same PBI file to multiple data sources?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I strong recommend you to create tables in your excel files.

      That way you will not work with the sheets itself, but with the tables that you created.

       

      Like that, you can work with multiple excel files.

       

      Particularly, i've done this way so far.

    • Shelley's avatar
      Shelley
      Post Prodigy

      I'm not sure if a template is the best way. From what I'v read, it sounds like the template feature was intended to use with one data model and share the template with others for them to create pbix files from the same dataset. I experimented with a template once, but it didn't seem to suit my needs at the time and so I haven't used them since. So, I'm sorry I'm not much help.

      • cbb_fan's avatar
        cbb_fan
        New Member

        I'm currently having issues using PowerBI Desktop (actively working very hard to try to fix that issue). Meanwhile, I have this same need - to change the data source for an existing report. Is there any way to do this that does not require use of the PowerBI Desktop application?

  • Having the same issue and cannot solve. I have followed the steps but my original data remains the source. When I delete that data it just gives me errors

  • I guess if you are using an odbc connection you are in bad troubles. 

     

    I am using MongoDB and there is no option to change datasource.


    Sincerely

    Ezequias Rocha

  • Anonymous's avatar
    Anonymous
    Not applicable

    If you change your data source or update it, do you lose any Dax or measures you built?  Will it over-ride any additional columns you built during transformations and or in the dataview of the tables?

    • Anonymous's avatar
      Anonymous
      Not applicable
      Hi, Actually if you dont delete any steps that were made before, all the changes made earlier will be the same. Just make sure that your new dataset have tha same structure that the old one had or you'll get some error saying the columns or anything else was not found.