Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
davidjmpinto
Frequent Visitor

Dynamically export filtered data to CSV via Power Automate

Hi all,

I'm trying to build a Power Automate flow that exports data from a Power BI semantic model to a CSV file in SharePoint, using the Run a query against a dataset action (to export more than 1000 rows). I've followed FourMoo's blog (link),the Curbal video (link) and Reza Dorrani (https://www.youtube.com/watch?v=cT4JdClkLh8&t=26s), but my scenario goes a step further: the user picks the dimension and measure dynamically.

Scenario 
The report uses: Field parameter Dimensions — user picks one dimension (e.g. Product Brand, Sales Rep)
Field parameter Measures — user picks one measure (e.g. Invoiced Sales)

Calculation group Time Intelligence with selections like CY, PY,
Other filters in the filter pane / slicers (Year, Country, Currency)

I need the export to reflect whatever the user has selected — dimension, measure, time calc, and the other filters — and export to CSV. 

1 ACCEPTED SOLUTION

Hi @davidjmpinto,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin for the prompt response.

 

The issue here is the DAX query copied from Performance Analyzer is static, so the ‘Run a query against a dataset’ action will always execute the same query and return the same result.

Power Automate does not automatically pick up the current slicer, field parameter or calculation group selections from the report.

To make the export dynamic, the selected values from the power bi need to be passed into the flow and then applied dynamically in the DAX query before execution. Otherwise the export will continue returning the same data each time.

 

Thanks and regards,

Anjan Kumar Chippa

 

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Sounds good. What is your question?  What have you tried and where are you stuck?

I followed the ‘Run a query against a dataset’ method (as I only want to export a matrix, I obtained the DAX query directly from the Performance Analyzer). The problem is that if I select different filters and run the flow, the exported data is always the same and does not adapt to my selection.

Hi @davidjmpinto,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin for the prompt response.

 

The issue here is the DAX query copied from Performance Analyzer is static, so the ‘Run a query against a dataset’ action will always execute the same query and return the same result.

Power Automate does not automatically pick up the current slicer, field parameter or calculation group selections from the report.

To make the export dynamic, the selected values from the power bi need to be passed into the flow and then applied dynamically in the DAX query before execution. Otherwise the export will continue returning the same data each time.

 

Thanks and regards,

Anjan Kumar Chippa

 

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors