Power Automate with Power BI, Plus Error Handling and Governance
Phase 3 goal
Replace manual chasing, copying, and emailing with flows that move data between Excel, SharePoint, Teams/Outlook, and Power BI, and that alert people when program metrics cross thresholds.
Licensing note: Standard connectors (SharePoint, Excel Online (Business), Outlook, Teams, Approvals, Power BI) come with most Microsoft 365 licenses. Premium connectors (e.g., HTTP, SQL, Dataverse in some cases) need extra licensing. Your environment may also have DLP policies that block some connector combinations. Check your tenant before you design.
π― Learning objectives
Tick each one when you can actually do it.
π‘ Key concepts
- Power BI connector (key operations):
- Trigger: When a data driven alert is triggered (from dashboard tile alerts in Module 2.7)
- Action: Refresh a dataset (semantic model). Chain it after a source file lands so the report updates right away.
- Action: Run a query against a dataset. Executes a DAX query and returns rows, e.g., to email a top-10 list.
- Action: Export to File for Power BI Reports / Paginated Reports (needs Premium/Fabric capacity)
- Power BI β Power Automate visual: A button inside a report that runs a flow with the user's current filter context (e.g., "Email this program's status to me").
- Try/Catch pattern:
Scope: TryβScope: Catch(configure run after = has failed / timed out) β log the error to a SharePoint list + notify the owner.Scope: Finallyfor cleanup. - Retry policies on actions that call services.
- Governance: Build flows inside Solutions (for moving between environments), use a service account or shared ownership (so flows don't die when someone leaves), add a co-owner, and document trigger, purpose, owner, and data touched.
- Never hard-code passwords or keys in flows. Use connection references and environment variables.
π Hands-on exercise: CPI Alert β Teams + Log
Data: the Power BI dashboard tile alert from Module 2.7 (Portfolio CPI Cum < 0.95). SharePoint list Alert Log (AlertTime, Metric, Value, Threshold, Program/Scope, NotifiedTo, Acknowledged Y/N).
- Flow trigger: Power BI When a data driven alert is triggered β select your alert.
- Run a query against a dataset with a DAX query that returns programs with CPI Cum < 0.95:
EVALUATE FILTER ( ADDCOLUMNS ( VALUES ( dim_Program[ProgramName] ), "CPI", [CPI Cum], "EAC Gap", [EAC Gap] ), NOT ISBLANK ( [CPI] ) && [CPI] < 0.95 ) - Create an HTML table from the results and post to a Teams channel and email.
- Log each alert to
Alert Log. - Wrap the steps in Try/Catch scopes. Force a failure (wrong dataset) and confirm the catch path logs and notifies you.
π¦ Mini-project: Data-Lands-Then-Refresh Chain
When a new file lands in the status_drops SharePoint library β wait for the file to be fully uploaded (e.g., a short Delay or a check that the file size is stable) β Refresh a dataset β wait/poll until refresh completes (or use a scheduled check) β Run a query against a dataset for late milestones β email the PM a "new data processed" summary. Document the flow (purpose, owner, connections, failure handling) in a one-page README.
π§ Self-check quiz
Answer in your own words, then check. Grade yourself honestly; your score is saved.