No feedback found for this session
BI for Beginners (service version) Session 1
Power BI
beginner
Session materials
Session outline
- practical first
- loading data
- making visualizations
- manipulating data
- then some explanation and examples
- what is it for?
- how does it work?
Two words of warning…
- This course uses Power BI Service. Most of the skills here are transferable to other versions of Power BI, but you’ll need Service to follow the examples
- Licencing and publication can be complicated in Power BI. We don’t discuss that much here, but it’s important to understand the implications if you’re planning to use it in practice. The KIND Network is a good resource for those kinds of questions.
Hospital occupancy data
Task
- download, and open the sample s01_data.xlsx workbook in Excel
- have a look at the two sheets, called
occupancy_sh
andwards_sh
- each contains a table, which are named
occupancy
andwards
- close the Excel file
Open Power BI service
Task
- Navigate to https://app.powerbi.com/
- Select
New Report
Loading data
Task
- select
Excel (preview)
- select
Upload file
- now drag your Excel workbook into the Power BI window
Hospital occupancy data
Task
- we can either load the worksheets or the tables from the Excel file
- if you’re planning to work with data from Excel, we’d strongly advise you to work with tables rather than worksheets
- select the two tables in the preview and select
Create
The Report View
- this is where we’ll build our dashboard
- take a minute to look round - particularly noting the three panes (
Filters
,Visualizations
, andData
) on the right of the screen - you should also save your report at this point
A note on data loading
- data loading is one-way
- what we do in Power BI won’t change the underlying files
- but if our files change, our dashboard will change
- we’ll usually need to refresh our data to see that
A first visual
- for now, let’s use this data to build a simple visualization
Task
- make sure you select
Edit
from the menu
- Select
Line chart
from the visualizations pane
- Enlarge the visualisation to fill the page by dragging the corners of the new line chart to fill the report area
- Add some data:
- Drag the
OccupiedBeds
column from the occupancy table to theY-axis
field - Drag the
date
column from the occupancy table to the X-axis field
- Drag the
- you should have a nice, craggy, time series graph of bed occupancy
- don’t panic if you have a straight-line graph
- Power BI will usually aggregate your data. This straight line graph comes from Power BI adding all the values for the years 2022 and 2023 together, and plotting a graph between those two points
- you control aggregation from the drop-down menu on the data in your field
- we can do similar aggregations on our other data too. Swap
Sum
forAverage
in yourOccupiedBeds
field
Making our chart more useful
Task
- Try dragging the WardName column to the Legend field
or to the Small multiples
field:
Formatting
- formatting options live in the paintbrush tab above the grid of visualisations
- there are lots of options there
- a good homework project would be to experiment with re-styling your graph
Changing our chart type
- this is easy: just make sure your chart is selected (look for the tiny grey corners ), and click a new graph icon (liked stacked columns )
- that will change the type of graph you’re building - in this case, to a stacked column chart
What’s happening behind the scenes?
to to your workspace
you should see a graph for your dashboard
now follow the
...
menu from theSemantic model
toOpen data model
The data model
- the data model gives you an overview of your data
- we can also modify aspects of the data from here (data types, relationships, …)
Calculated columns
- Calculated columns are how we describe columns calculated from other values
- Here, we could calculate something simple for each ward - how about the number of non-closed beds available?
Task
- select New column from the ribbon
- now we write a formula in the formula bar:
AvailableBeds = [BedComp] - [ClosedBed]
- AvailableBeds = our new column name
[BedComp]
and[ClosedBed]
are the existing column names that we’re subtracting- now return to your report. You should see your new calculated column available for use
- Congratulations! You’ve just written your first DAX formula.
What is DAX?
DAX (Data Analysis eXpressions) is the formula language used in Power BI, Power Pivot, and across various MS SQL tools…
- similar to Excel formulas
- functions have similar names and similar behaviours
- DAX is more ‘fussy’ than Excel
- we’ll talk about DAX more in session 4
What is Power BI for?
- NHS Scotland TURAS intelligence
- NHS Digital Adult Social Care dashboard - particularly great for showing how Power BI can be used as a hub for data. I imagine how many Excel files on shared network drives this might have required before…
- Northern Ireland Department of Health COVID dashboard - an object lesson in scale, and I’d be keen to use Power BI if a service potentially was going to be very busy, or experience highly variable load
- QI project dashboard from NHS England’s East London NHS Foundation Trust - some useful thoughts about implementing a project in Power BI
Power BI has attractive features
- Interactive
- Dynamic
- Presenting data from many sources
- Scalable
- Separates data from analysis/presentation
Homework tasks
- Try using the filters pane to play with your dashboard. How do filters change your visual?
- Could you use the data from this session to find out how often a ward is overcrowded?
- Can you plot the AvailableBeds column?