Forum Discussion

Bromik's avatar
Bromik
Icon for Helper I rankHelper I
1 year ago
Solved

Change the table source automatically in powerBI

I have three different excel files with data. Also in my dashboard I have a slicer with the names equal to the names of my excel files. The report is based on the data from one of the files. I need to dynamically insert the name of the file into the command  Excel.Workbook(File.Contents(DYNAMICALLY_INSERTED_FILE), null, true) based on the value that is selected in a slicer. So that when the user clicks on a file name in a slicer, the data in the report is pulled from the chosen file.

How can i do that?

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Bromik So, not really going to work that way. Instead, import all three files and add a column for the file name. Append them together as one big table. Use the file name column in your slicer.

    • Bromik's avatar
      Bromik
      Icon for Helper I rankHelper I

      I have different columns in my files, So i cannot append tme. Can it be possible to download different files based on the user choice and based on the file downloaded change the visuals and the dashboard? 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi, Bromik 

        Thanks for Greg_Deckler's reply. Unfortunately, the current version of PBI Desktop doesn't support the functionality you're looking for, and visual objects are only affected after the data is loaded into the Semantic model.

        You can submit an idea for here and the product team will take note of such a need.

        Related Link: New tab (powerbi.com)

        Best Regards,
        Yang

        Community Support Team

        If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
        If I misunderstand your needs or you still have problems on it, please feel free to let us know.
        Thanks a lot!

        How to get your questions answered quickly --  How to provide sample data in the Power BI Forum