Why automate DAX?
Power Automate is a highly versatile tool that enables seamless interaction across various software within the Microsoft 365 ecosystem. Its diverse set of features becomes even more powerful when integrated with Generative AI: the analyst describes what they want, and the flow takes care of finding the right tables, generating the right query and delivering the result.
Designed for analysts who want insight in seconds, not for building yet another piece of software.
What this flow does
The system integrates Power Automate with Deepseek to simplify query generation in Power BI. The user provides a prompt; the flow searches datasets, identifies relevant tables, builds the corresponding DAX query, runs it, formats the data and delivers the result via email.
Workflow Steps
- User Prompt: The user provides a query prompt to the system, such as "I want the top 10 users in terms of revenue."
- AI Query Trigger: Power Automate sends the prompt via an HTTP request to Deepseek, which analyzes it, scans the dataset's table descriptions, and identifies the necessary table names and columns.
- Generate DAX Query: The system triggers a second HTTP request to create the corresponding DAX query based on the identified tables and columns.
- Data Transformation: The results are processed using Power Automate's
Composeaction to extract only the essential information for the DAX query. - Run DAX Query: The generated DAX query is executed against the dataset, and the output is returned in JSON format.
- Add Data to Excel: The resulting data is formatted and added as a new row in an Excel report.
- Send Report: The final report is sent to the user via email using the Outlook connector.
Why this matters
- Speed: Analysts get answers in seconds instead of writing DAX from scratch.
- Consistency: The LLM follows the documented schema, reducing syntax errors.
- Accessibility: Non-technical users can request KPIs in plain English.
Interested in another Power Platform automation case?
See Invoice OCR Automation