Forum Discussion

JP-Ronse's avatar
JP-Ronse
Helper II
8 years ago
Solved

Run multiple queries at once

Hi,

 

I am working on a report that requires 3 queries to run for the complete report. Each query has different source files and steps to execute. I would like to know if it is possible  to create a "master" query that runs query1, query2, ...

 

Compare it to VBA code:

 

Sub Master

   Call Macro1

   Call Macro2

End Sub

 

Thanks & kind regards,

 

JP-Ronse

 

 

 

  • Oh, well Power BI does all of that automatically when you schedule a refresh.

     

    Also, in Desktop, if you hit the Refresh button on the home tab, all queries refresh.

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    If you are Merging or Appending queries together, yes, you can put that all in a single query with a bit of renaming of steps and such. But, I believe you are asking about a single query that would spawn 3 tables, correct? I'm trying to think of a way that could be done but not coming up with anything at the moment.

    • JP-Ronse's avatar
      JP-Ronse
      Helper II

      Hi,

       

      I do not want merging or appending queries because the structure of some files is different, the data is not related and I want to avoid to many filters/slicers in the pivot table. However, while writing this and thinking about, it is maybe an option.

       

      Now, the easiest way I've found will be adding a button and use VBA to refresh all pivot's.

       

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Yeah, the issue is that one table is created per query. So, even with references and things like that, I'm not sure how you would get them to run sequentially. Is there a reason they need to run sequentially?