Forum Discussion
Justas4478
Post Prodigy
5 months agoAutomate table extract from report & upload file to share point
Hi, I have this matrix visual table in my report that needs to be extracted every day. Report is published in power bi service and after extract excel file would be placed in dedicated documen...
- 5 months ago
Your best bet is to use Power Automate to query the dataset and then save the output in SharePoint.
1. Create Scheduled Flow- In Power Automate
- Use “Recurrence” trigger
- Frequency: Daily
- Time: your desired refresh time
- Query Power BI Dataset
Use the Power BI connector:
- Action: “Run a query against a dataset”
- Workspace: your workspace
- Dataset: your semantic model
- Look out for:
- Always return a flat table (no nested structures)
- Avoid very large result sets (API limits ~100k rows per call depending on payload size)
- Use measures vs raw columns when possible (performance + consistency)
- Parse and Shape Output
The output comes back as JSON.
Add:
- “Parse JSON” action
- Use sample output from prior run to generate schema
Then:
- “Create CSV table” (simplest)
- Input: body('Parse_JSON')?['results'][0]['tables'][0]['rows']
- Save to SharePoint
Use SharePoint connector:
- Action: “Create file”
- Site Address: your SharePoint site
- Folder Path: document library location
- File Name:
dataset_export_@{formatDateTime(utcNow(),'yyyy-MM-dd')}.csv
- File Content: output of Create CSV table
luisoliveira89
Helper I
5 months agoAnother option, if you have a Fabric subscription, is to use Notebooks and PySpark. You can leverage the Power BI REST API to export content.
Justas4478
Post Prodigy
5 months agoluisoliveira89 I changed flow to create csv file and it works now. It is not ideal since size is double of xlsx but files themselves are not that big