Forum Discussion
Use Power Automate to extract filtered data to Excel
- 7 months ago
When you are creating a power automate flow for this use case, do not create a flow in power automate portal, instead create in power bi desktop. Otherwise, your flow might not be able to capture the selections in the power bi slicer.
To prepare the dax query easily, I would suggest you to create a table visual in your report and make sure unwanted columns are removed, columns are renamed appropriately and totals are disabled from the visual.
Place the slicer and select one or two values, Then from the performance analyzer you will be able to capture the visual dax query.
You can use the same in your power qutomate flow. This is not completed yet, as the slicer selections would be hardcoded, you can identify the section where the hardcoded values are present in the dax query and replave them with the values capture by the flow.
Note: if it is only one value then you can directly replace the value with the captured value, if there are multiple values selected in the slicer then you might need to use join/concatenate function in power automate to concatenate all the values delimted by a comma
here is a detailed article: https://powerbi.microsoft.com/en-us/blog/unlocking-new-self-service-bi-scenarios-with-executequeries-support-in-power-automate/
Connect on LinkedIn
read my blogs here: techietips.co.in
Did I answer your question? Mark my post as a solution! If I helped you, click on the Thumbs Up to give Kudos.
Proud to be a Super User!
Hi jtooke
Using Power Automate to Execute a DAX query requires a valid query to be sent. It will execute against your model based on the query execution parameters.
For example:
EVALUATE RR
This would return an output of your 'RR' table. The problem with your approach is that on Power BI service, you cannot send the result of a visual calculation to Power Automate.
Instead, you have a few other approaches that would work. On the top of my head, two comes to mind:
1. Embed PowerApps into your model. This will pull the data directly from your model along with any filters your user has selected. From there, you can create an export button which would save the current table or gallery result and you can ask it to generate an excel file and have it sent to their email or your desired location.
2. Give them the ability to connect to your model by live connecting to your model via Excel. With this, they can explore the data as they see fit.