BI for Beginners Session 1

Power BI
beginner
Published

February 13, 2025

Session materials

Previous attendees have said…

  • 60 previous attendees have left feedback
  • 100% would recommend this session to a colleague
  • 97% said that this session was pitched correctly

Three random comments from previous attendees
  • Great introduction to a powerful tool.
  • Really useful introduction and looking forward to next in series. Makes what seems like a daunting topic very do-able
  • thought the session was well run and informative. clear frustration to all around the different IT infrastructure in existence across NHS Scotland, but demonstrated power of Power Query and Power BI. not an expert in field, but just about kept up

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…

  1. This course uses Power BI Desktop. Most of the skills here are transferable to other versions of Power BI, but you’ll need Desktop to follow the examples
  2. 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
  1. download, and open the sample s01_data.xlsx workbook in Excel
  2. have a look at the two sheets, called occupancy_sh and wards_sh
  3. each contains a table, which are named occupancy and wards
  4. close the Excel file

Open Power BI desktop

Task
  1. Open Power BI desktop

Loading data

Task
  1. go to the data view
  2. go to the Get data dropdown on the ribbon, and select Excel workbook

Hospital occupancy data

Task
  1. we want data/s01_data.xlsx
  2. select the two tables in the preview and select load

Three views

  • Report view, where you’ll build your dashboard
  • Data view, where you’ll manage your data sources
  • Model view, where you’ll manage the model
Task
  1. Have a look at each of the three views

Hospital occupancy data

  • once loaded, we can access this data in lots of different ways:
    • in report view, via the data pane
    • in data view
    • in model view as the relationship blocks
  • data loading is one-way
    • what we do in Power BI won’t change the underlying files
    • but if our files change, we’ll need to refresh our data

What does the model do?

  • The model shows (and controls) how the elements of your data fit together

  • Power BI should have guessed a couple of relationships in this data

  • we’ll talk about these relationships more in session 4

Investigating our data

  • for now, let’s use this data to build a simple visualisation
Task
  1. Go to the data view
  2. Look at each of tables
  3. In the occupancy table, select the OccupiedBeds column
  4. Look through the ribbon’s Column tools to see what options are available

Time to add a visualization

Task
  1. Go to the report view
  2. Select Line chart from the visualizations pane
  3. Enlarge the visualisation to fill the page
  4. Add some data:
    1. Drag the OccupiedBeds column from the occupancy table to the Y-axis field
    2. Drag the Date column from the occupancy table to the X-axis field

Making our chart more useful

Task
  1. Try dragging the WardName column to the Legend field

Changing the data

Task
  1. open data/s01_data.xlsx in Excel (again)
  2. change some of the values
  3. close Excel (essential) and return to Power BI
  4. refresh the data

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
  1. go to the data view and select the occupancy table
  2. select New column from the ribbon
  3. now we write a formula in the formula bar: AvailableBeds = [BedComp] - [ClosedBed]
  4. AvailableBeds = our new column name
  5. [BedComp] and [ClosedBed] are the existing column names that we’re subtracting
  • 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…

  • 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?

Power BI has attractive features

  • Interactive
  • Dynamic
  • Presenting data from many sources
  • Scalable
  • Separates data from analysis/presentation

Homework tasks

  1. Try using the filters pane to play with your dashboard. How do filters change your visual?
  2. Could you use the data from this session to find out how often a ward is overcrowded?
  3. Can you plot the AvailableBeds column?