KPI Dashboards in Power BI part 4: Building a Power Automate workflow
When the status of the goal changes to At risk, the workflow will generate a Teams message to the goal owners
- set up a manual goal and trigger for Overall profit margin %
- create a new workflow in Power Automate
- test the workflow by updating the goal status and checking that the Teams messages and email messages are generated as they should be
SECTION 1 - CREATE A POWER AUTOMATE WORKFLOW – SET UP A MANUAL KPI METRIC
- Search on Insights
7. Format the current value and final target
- Percentage – 1 decimal place
- Click on or set up rules
- If Value | is greater or equal to | 100 | % of target
- Change status to On track
- If Value | is greater or equal to | 90 | % of target
- Change status to At risk
- Otherwise change status to Behind
- Click on Save
- Click on X in top right hand corner of Overall Revenues box
- Click Save to update the KPI Metric
- Edit the metric
- Current value | Enter value – 0.35
- Save
- The status will change from At risk to Behind
- This will take you into Power Automate
- Flow name - Theta CIMA status change workflow
- We want to set up a trigger that monitors when a goal changes
- Search for Power BI goal
- Workspace – My metrics workspace
- Scorecard ID – Theta CIMA training scorecard
- Goal ID – Overall profit margin
- Polling interval (sec) – 14400 (unchanged)
- Select + New step
- Select the Get a goal trigger
- Workspace – My metrics workspace
- Scorecard ID – Theta CIMA training scorecard
- Goal ID – Overall profit margin
- Select Save
- Status = At risk - send a Teams message
- Status = Behind – send an email to the goal owner
- Status = On track – no action
- The SWITCH control works in exactly the same way as the SWITCH function in DAX
- Click on + New step
- Search for the SWITCH control
- Status = At risk - send a Teams message
- Make sure that the Status typed in matches exactly the status in the Scorecard
- Click on Add an action
- Post as - User
- Post in - Channel
- Team - Power BI metrics testing
- Channel – General
- Type in the message box The status of
- Click on Dynamic content +
- Search for goal – to pull up all of the Power BI fields
- Select Goal name
- Type in the message box is now
- Select the field Goal status and it appears in the message box.
- Type in a full stop. and a space
- We have competed the first sentence – and the message box should look like this:
- Build the next sentence as follows:
- Type in The current value of the goal is + space
- Pull in the field Changed goal New current value
- Type in a full stop. and a space
- Build the next sentence as follows:
- Type in The value of the goal was previously + space
- Pull in the field Changed goal Old current value
- Type in a full stop. and a space
- Type in the final sentence
- Type in the final sentence. Please can you investigate and revert back.
- Subject – goal status change
The actions for the first case are now complete.
- Status = Behind - send an email to the goal owner
- Make sure that the Status typed in matches exactly the status in the Scorecard
- Click on Add an action
24. Search for Send an email
- Let us make the email address selection dynamic
- Click on Add dynamic content +
- Select the field Goal owner
- Pull in the field Goal name
- Type in has a status of + space
- Pull in the field Goal status
- Type in the message box The status of
- Click on Dynamic content +
- Search for goal – to pull up all of the Power BI fields
- Select Goal name
- Type in the message box is now
- Select the field Goal status and it appears in the message box.
- Type in a full stop. and a spac
- Build the next sentence as follows:
- Type in The current value of the goal is + space
- Pull in the field Changed goal New current value
- Type in a full stop. and a space
- Build the next sentence as follows:
- Type in The current value of the goal is + space
- Pull in the field Changed goal New current value
- Type in a full stop. and a space
- Build the next sentence as follows:
- Type in The value of the goal was previously + space
- Pull in the field Changed goal Old current value
- Type in a full stop. and a space
- Type in the final sentence
- Type in the final sentence. Please can you investigate and revert back.
- Status = On track – no action
- Click on the Test button at the bottom of the box
- Edit the goal
- Current value = 0.49
- The following Teams message has arrived within the Teams group Power BI metrics testing
- There is a message saying Your flow ran successfully
- There are green ticks against each flow stage
- Case 1 has a green tick against it – showing that Case 1 was triggered as expected
- Scroll down to look at the OUTPUTS section
- Scroll down to look at the OUTPUTS section
- The expression result generated is shown as At risk
- Click on Case 1
- Click on Post a message in a chat or channel
- The inputs and outputs generated can be seen
2. Select Manually from the Test Flow box
- Click on the Test button at the bottom of the box
3. You will now be instructed to change the current goal being tracked manually
4. Switch over into Power BI and update manually the goal
- Edit the goal
- Current value = 0.35
- The following email has arrived
- There is a message saying Your flow ran successfully
- There are green ticks against each flow stage
- Scroll down to look at the OUTPUTS section
- Case 2 has a green tick against it – showing that Case 1 was triggered as expected
- The expression result generated is shown as Behind
- Click on Case 2
- Click on Send an email (V2)
- The inputs and outputs generated can be seen
- The workflows have worked perfectly
SECTION 5 - TESTING THE POWER AUTOMATE WORKFLOW – ON TRACK STATUS
2. Select Manually from the Test Flow box
- Click on the Test button at the bottom of the box
- You will now be instructed to change the current goal being tracked manually
- Edit the goal
- Current value = 0.51
- There is a message saying Your flow ran successfully
- There are green ticks against each flow stage
- Case 2 has a green tick against it – showing that Case 1 was triggered
- The expression result generated is shown as Behind
- The Default box has a green tick
- The workflows have worked perfectly
SECTION 6 - POWERPOINT – SHOWING AN EMBEDDED POWER BI DASHBOARD
This section demonstrates a very useful Power BI feature that was released last year May/ June. This feature allows you to embed a Power BI dashboard directly within a PowerPoint presentation which is a great way of presenting the latest KPI's for Town Halls or a Board Meeting.
- In option 4, search for Power BI and select the second option Microsoft Power BI
7. Paste the URL of the Power BI service into the Paste box as below
- Click the Insert button
DISCLAIMER
The publication has been prepared for general guidance on matters of interest only, and does not constitute professional advice. You should not act upon the information contained in this publication without obtaining specific professional advice. No republication or warranty (express or implied) is given as to the accuracy or completeness of the information contained in this publication, and, to the extent permitted by law. Theta Global Advisors LLP, employees and agents do not accept or assume any liability, responsibility or duty of care for any consequences of you or anyone else acting, or refraining to act, in reliance on the information contained in this publication or for any decision based upon it. Ó 2023 Theta. All rights reserved. Not for further distribution without the permission of Theta.