Locked lesson.
About this lesson
Dashboards are all about exposing problems. So why not let the system notify you when something goes offside?
Exercise files
Download this lesson’s exercise file. You can download source data files for the course from the resources section of your Lessons page.
Working with Alerts.pbix348.8 KB
Quick reference
Working with Alerts
Setting and managing alerts for your data.
When to use
When you want to automatically get notified if a key metric is above or below a tolerance threshold.
Instructions
All alerts are created and managed at PowerBI.com
To create a new alert:
- Go to a dashboard tile and select the … in the top right
- Click the bell icon
- Click Add Alert Rule
- Name your alert
- Choose if you would like to be alerted if the metrics is above or below your threshold
- Set the threshold
- Choose how often you’d like to be alerted
- Change the setting for email if desired
- Click Save & Close
To modify (or remove) an existing alert
- Go to the dashboard, select the tile that has the rule and click the … in the top right
- Click the bell icon
- Click the arrow next to the alert name
- Modify the rule as desired
- Delete the rule (if desired) by clicking the trash can
Hints & tips
- Alerts can only be set up on visuals that return a single data point (like Cards).
- Alerts are global. i.e. If you set an alert, it will trigger in the Power BI Service, to your email, and also to your mobile devices with the Power BI app installed. There is no way to separate this behavior.
- When modifying a rule, you can temporarily suspend it by toggling the Active button to off.
Login to download
- 00:05 So what I'd like to show you now is how to set alerts for data that changes.
- 00:11 So what we're gonna start with though is we're going cut our dataset down
- 00:15 a little bit.
- 00:16 So we'll go back, we'll open up our sample file.
- 00:18 We'll go to Edit Queries and this is gonna go back into the original query here.
- 00:24 Now if you've opened this up from the sample files, it's very likely that it's
- 00:28 coming back and telling you that it can't find any of the data.
- 00:31 So what we'll do is we'll come back to the source step, click on the gear icon.
- 00:36 And we will go and browse and find the file that is called SalesTransactions.txt.
- 00:41 And say, OK.
- 00:44 And then once that's done, it should refresh the previous.
- 00:47 So it looks like this.
- 00:48 We can go back to the filtered row step at the end.
- 00:52 Now just to make sure that we've got changing data here,
- 00:55 what I'm gonna do is I'm going to go in and I'm gonna choose the Keep Rows.
- 01:00 And I'm gonna keep just the top rows and
- 01:02 I know there's about 40,000 rows in this file.
- 01:05 So I'm gonna keep just the top 10,000 for right now.
- 01:07 We're gonna cut this dataset down a little bit to the earliest records and
- 01:11 we'll say, OK.
- 01:12 So add a new step called Kept First Rows.
- 01:16 And when we go and say, close and apply.
- 01:19 You'll notice that our sales cut rate down to 1.41 million.
- 01:22 So obviously, there's a lot less stuff.
- 01:24 It looks like the last date was July 21st, 2015.
- 01:26 All good for right now.
- 01:27 We're just trying to roll our date back in time a little.
- 01:31 Now that that's done, what we're gonna do is we're gonna say,
- 01:35 Save and we're gonna publish our report again out to the cloud.
- 01:40 Replace the dataset and make sure when it opens up, that we actually have
- 01:45 the same date of July 21, 2015 showing in the Power BI service.
- 01:49 So go to open loaded pencil.
- 01:54 And we've now got our report showing July 21st.
- 01:56 So that's cool.
- 01:59 Now, let's go see about setting alerts to see how we get notified when these
- 02:03 numbers go up.
- 02:04 That's what we wanna know about.
- 02:06 So I'm gonna go and click on my workspace and I'm gonna go to my dashboard,
- 02:10 because all alerts are set in the Power BI service from the dashboard.
- 02:15 Now the key thing that you have to remember about working with alerts is that
- 02:20 alerts can only be set on items that have a single data point,
- 02:23 which means that you cannot set an alert on this chart.
- 02:26 You can't set an alert on this chart, but we should be able to set an alerts here.
- 02:32 I can see the little bell icon.
- 02:34 If we mouse over the top right hand corner of units sold,
- 02:36 let me click the dot, dot, dot.
- 02:38 You notice that we have a bell icon here and let's see if we have a bell icon for
- 02:43 the latest date, and it would appear that we do.
- 02:46 So in this case, what I like to do is I like to set an alert to see have
- 02:51 the sales increased greater than let's say, 1.6 million.
- 02:56 So I go to the dot, dot, dot and we will click on manage alerts.
- 03:02 And it says, would you like to add an alert rule?
- 03:04 So I will say, yes.
- 03:06 The alert is on.
- 03:08 The alert is gonna be for total sales and we're gonna set this alert for
- 03:12 when total sales is above.
- 03:14 And let's go and put this thing at, I don't know.
- 03:16 Let's say, 2 million.
- 03:19 There we are.
- 03:20 Notify me at most once every 24 hours.
- 03:23 Now I also have the option to send me an email, as well.
- 03:28 So this is kind of a useful thing I find is that you can send me an email when
- 03:31 something actually changes.
- 03:32 So at this point, I'm gonna say, save and close and
- 03:35 it doesn't really look like anything's changed all that much.
- 03:39 So let's figure out if it has.
- 03:41 What I'm gonna do is I'm gonna go close my window from my web browser.
- 03:46 I'm gonna come back into Power BI desktop.
- 03:49 And now, I'm gonna undo that change I just did to get all of my data.
- 03:53 So I'm gonna go to Edit Queries.
- 03:56 I'm gonna come down to my query chain.
- 03:58 And right at the end here, this is where we kept the first rows,
- 04:01 the only kept the first 10,000.
- 04:03 I'm gonna click the X to delete that step, so it no longer filters out those first
- 04:07 10 rows where we'll no longer fill just rather keep those first 10,000 rows.
- 04:12 So now what I can do is I can say, close and apply and it should run and bring me
- 04:17 back $5.24 million for the sales which is obviously higher than a 2 million.
- 04:22 So we're back to our original state.
- 04:25 So again, save the file.
- 04:27 Cuz you have to save it before you publish it.
- 04:30 Now, we'll publish it.
- 04:32 I'm gonna replace the dataset.
- 04:38 And it's gonna load it all up into Power BI for me and
- 04:42 then I'm gonna open the loaded pencil dataset inside powerbi.com.
- 04:47 We will log in.
- 04:52 And at this point, you can see that the data has indeed been updated.
- 04:57 Now you'll also notice that up in the top right,
- 05:00 something just popped up with a little yellow notification.
- 05:04 And if I click on this, it says, the alert for total sales.
- 05:07 Total sales for loaded pencil is 5.2 million,
- 05:09 which is above the threshold of 2 million.
- 05:12 So now, I can click Go to Tile and
- 05:14 I can go directly to the tile where I can see this.
- 05:17 Now, this is in what we call focus mode.
- 05:20 Let's exit focus mode for a second.
- 05:23 You can see that I have an alert icon,
- 05:25 that's actually setup on the tile which is kind of nice.
- 05:27 So at least I know what's going on with it.
- 05:30 If I need to make any changes to it, what I would do is I'd come back.
- 05:34 Go into the manage alerts.
- 05:37 Click on the alert rule and
- 05:38 I can either turn it off or I can delete the rule outright.
- 05:44 One thing to be aware of with these rules, these rules are global.
- 05:47 You cannot set something, so that it only works on email or in the service or
- 05:52 on your mobile app.
- 05:53 When you actually set an alert rule, it works on all of those locations and
- 05:56 I think that's a bit unfortunate.
- 05:58 I wish you could separate rule for your mobile app from email,
- 06:01 cuz there's some alerts that I don't need to know about at 10 o'clock at
- 06:04 night on a Saturday where they'd be just fine to wait until Monday morning.
- 06:07 But unfortunately, it's all in one.
- 06:10 But it's a cool feature that you can actually use to be alerted
- 06:13 right away when something changes.
Lesson notes are only available for subscribers.