Forum Discussion

AyushAwasthi's avatar
AyushAwasthi
Helper I
1 year ago
Solved

Export multiple Power BI tables to a template excel file

I have a Power BI file which has multiple pages and there is a table on every page of the report. The table has same columns on each page but I have different measures on each page to show different rows in the table.

 

I want to have a button at one place to just copy or export the data in each table of the PBI to a template excel and preferably then be sent to the user on his email.

 

Can this be done using Power Automate or any other automation?

 

Thanks in advance!

  • v-menakakota's avatar
    v-menakakota
    1 year ago

    Hi AyushAwasthi ,

    Thanks for the update, Going forward when using DAX queries captured via Performance Analyzer, slicer values get hard-coded into the query, which means they won’t reflect real-time user selections.

    To address this exact limitation, I’d recommend using Paginated Reports with parameters, which allow you to dynamically pass slicer selections at runtime.

    • You can define report parameters that correspond to slicers.

    • These parameters accept values dynamically, either from a Power BI button using Power Automate, or from a scheduled/triggered flow.

    • The export will always reflect the user’s current selections not fixed one.

    To publish and automate paginated reports, your workspace must be in a Power BI Premium capacity or you must have a Power BI Premium Per User (PPU) license.

    If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.

    Best Regards, 
    Menaka Kota 
    Community Support Team 

8 Replies

    • AyushAwasthi's avatar
      AyushAwasthi
      Helper I

      But in my case the user is making slicer selections, and if I copy the DAX query those selections are hard coded.

       

      Will this work if the user makes a different slicer selection? Also I want to copy the rows to an already created template excel. How can that be achieved?

      • v-menakakota's avatar
        v-menakakota
        Community Support

        Hi AyushAwasthi ,

        Thanks for the update, Going forward when using DAX queries captured via Performance Analyzer, slicer values get hard-coded into the query, which means they won’t reflect real-time user selections.

        To address this exact limitation, I’d recommend using Paginated Reports with parameters, which allow you to dynamically pass slicer selections at runtime.

        • You can define report parameters that correspond to slicers.

        • These parameters accept values dynamically, either from a Power BI button using Power Automate, or from a scheduled/triggered flow.

        • The export will always reflect the user’s current selections not fixed one.

        To publish and automate paginated reports, your workspace must be in a Power BI Premium capacity or you must have a Power BI Premium Per User (PPU) license.

        If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.

        Best Regards, 
        Menaka Kota 
        Community Support Team 

  • v-menakakota's avatar
    v-menakakota
    Community Support

    Hi  AyushAwasthi  ,
    Thanks for reaching out to the Microsoft fabric community forum.

    In addition to the helpful response shared earlier, I’d also recommend reviewing the official Microsoft documentation which outlines how to automate Power BI report exports using Power Automate.

    Export and email a report with Power Automate - Power BI | Microsoft Learn

     

    I would also take a moment to thank  Cookistador  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference. 
     

    If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.

    Best Regards, 
    Menaka Kota 
    Community Support Team 

  • Hi AyushAwasthi 

    Yes, your requirement to export data from multiple tables across different pages in a Power BI report into a structured Excel template and then send it via email can be partially automated using Power Automate, though with some important considerations.

    Power BI does not natively allow exporting visuals (like tables from different pages) all at once. However, you can achieve your goal by using Power Automate buttons in Power BI (Power Automate for Power BI Visual) in combination with DAX queries and Power BI REST API or Power Automate actions.

    Here’s how this can be approached:

    1. Create a Power Automate flow that is triggered from a button in Power BI (via the Power Automate visual). This button can pass necessary parameters like user context or page identifiers.

    2. Use the “Run a query against a dataset” action in Power Automate (part of the Power BI connector) to run DAX queries that replicate the logic used in each table on the different pages of your report. Since you can't extract visual-level data directly, you'll need to simulate it using DAX in the flow.

    3. Format the results into a CSV or Excel format using the “Create CSV table” or “Create HTML table” action. If you want to insert the data into a pre-defined Excel template, you can use Excel Online (Business) actions to populate specific cells or tables within that file stored on OneDrive or SharePoint.

    4. Send the final Excel file via email using the “Send an email (V2)” action with the file as an attachment.

    5. Optionally, if you want this process to run on a schedule (e.g., daily summary), you can trigger it with a scheduled Power Automate flow instead of a Power BI button.

    Limitations:

    • You cannot directly “export visuals” from multiple report pages automatically.

    • This method works with semantic model (dataset) queries, so the measure logic must be replicated accurately in DAX.

    • Complex formatting within Power BI visuals (like conditional formatting or dynamic columns) won’t carry over automatically.

    In summary, yes, Power Automate can help automate exporting data from multiple logical tables (via DAX) into Excel and emailing it, but you’ll need to rebuild the logic for each page’s table using queries and handle the formatting and structuring manually in Power Automate. For fully automated and polished reporting, consider combining this with Paginated Reports or using Power BI Report Builder, which supports detailed export logic into Excel or PDF formats more natively.