Forum Discussion
Automating Excel Export from Power BI (Semantic Model Source)
- 8 months ago
Hi
Option A (recommended): Consult the dataset and generate the Excel
It works with any dataset (even if it is in another workspace).
What Flow Does
-
Run a DAX query against the dataset.
-
Dumps the result to an Excel file (OneDrive/SharePoint).
-
Sends it by email/Teams.
Steps
-
En Power Automate → Power BI (connector) → action Run a query against a dataset.
-
Workspace: The one in the dataset (not the one in your report).
-
Dataset: the shared Semantic Model .
-
Requires Build permissions (or that your flow uses a Main Service with access to the dataset).
-
Write a DAX query that returns a table, e.g.:
EVALUATE SUMMARIZECOLUMNS( 'DimFecha'[Mes], 'DimGTM'[GTM], "Ingresos", [Ingresos], "Unidades", [Unidades] )-
Pair the output (if necessary) and create Excel:
-
Excel Online (Business) → Create workbook (en OneDrive/SharePoint).
-
Add a table with the headers returned by the query.
-
Add rows to a table con los registros.
-
-
Send: Outlook/Teams → Send an email (V2) with Excel attached.
-
(Optional) Deletes the temporary/names the file with the date.
Advantages
-
You don't depend on the report or its pages/visuals.
-
Works with shared or certified datasets.
Total control of the layout and columns.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
-
Hi
Option A (recommended): Consult the dataset and generate the Excel
It works with any dataset (even if it is in another workspace).
What Flow Does
-
Run a DAX query against the dataset.
-
Dumps the result to an Excel file (OneDrive/SharePoint).
-
Sends it by email/Teams.
Steps
-
En Power Automate → Power BI (connector) → action Run a query against a dataset.
-
Workspace: The one in the dataset (not the one in your report).
-
Dataset: the shared Semantic Model .
-
Requires Build permissions (or that your flow uses a Main Service with access to the dataset).
-
Write a DAX query that returns a table, e.g.:
EVALUATE
SUMMARIZECOLUMNS(
'DimFecha'[Mes],
'DimGTM'[GTM],
"Ingresos", [Ingresos],
"Unidades", [Unidades]
)
-
Pair the output (if necessary) and create Excel:
-
Excel Online (Business) → Create workbook (en OneDrive/SharePoint).
-
Add a table with the headers returned by the query.
-
Add rows to a table con los registros.
-
-
Send: Outlook/Teams → Send an email (V2) with Excel attached.
-
(Optional) Deletes the temporary/names the file with the date.
Advantages
-
You don't depend on the report or its pages/visuals.
-
Works with shared or certified datasets.
Total control of the layout and columns.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!