Slides

Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

Getting Started

Introduction to Power BI & to This Course


What is Power BI?

Connect to and visualize any data using the unified, scalable platform
for self-service and enterprise business intelligence (BI)
that’s easy to use and helps you gain deeper data insight.
What is Power BI?

Data

Preparation Analysis Visualization


Why?

Individuals Teams

Who?

Power BI Desktop Power BI Pro Power BI Mobile

Prepare & Create Collaborate & Share Access Anywhere


How?
Can’t I Use Excel Instead?

Excel Power BI

Quick Calculations Big Data

Reports in Tabular Format Interactive Visualizations

Single Tool Only Collaboration


Course Outline
Single User (Power BI Desktop) Share & Collaborate

Getting Started Query Editor Power BI Pro

Data Preparation &


Preparations Workspaces
Transformation
Your
Journey Data Model Gateways

Data Analysis
Apps
Expressions

Relationships Power BI Mobile

Reports
How to Get the Most Out of This Course

Watch the Videos Adjust the Playback Speed

Follow Along Actively Learning by Doing

Fix Errors Apply Your Knowledge

Be Part of the Community Ask & Contribute

Be Creative Explore Options & Create Own Projects


How to Use the Attached Project Files

Go to
github.com/academind/power-bi-course-resources

Click to open Select “Code“


drop-down

Select
current
course
module
Download
module files
How to Use the Attached Project Files

Unzip the downloaded file


and copy the .pbix file
Open the .pbix file
you‘re interested in into a
folder of your choice

Repeat for all


remaining files and
close the“Data source
settings“ afterwards Open the Query Editor
Change the source path
to the file path on if required for the lecture
your computer*

* All source files can be found in the “main“ branch in the “source-files“ folder
Diving Into the Basics
Preparations to Follow Along Conveniently
Module Content

Understanding the Power BI Desktop Workflow

A Closer Look at the Power BI Desktop Interface

Creating the Project File & Recommended Settings


The Power BI Desktop Workflow

Query Editor
Query Editor Extract
Clean &
Transform
Data Preparation Transform
Load

Data Model
The Power BI Desktop Workflow

Query Editor
Query Editor Extract
Clean &
Transform
Data Preparation Transform
Load

Data Model
Data & Model View View & Edit
Inspect, Explore &
Relationships
Understand Data
Data Analysis between Tables

Report View
Create Reports with
Multiple Visuals
Data Visualization
Working with Power BI
Desktop
Understanding the Query Editor
Module Content

What is the Query Editor?

Working with Queries & Editing Rows and Columns

Transformations, Formatting & Handling Errors


The Power BI Desktop Workflow

Query Editor
Query Editor Extract
Clean &
Transform
Data Preparation Transform
Load

Data Model
Data & Model View View & Edit
Inspect, Explore &
Relationships
Understand Data
Data Analysis between Tables

Report View
Create Reports with
Multiple Visuals
Data Visualization
What is “Data Cleansing“ / “Data Cleaning“?

Query
Remove duplicate &
unrequired data

Fix errors, missing values,


empty fields

Query Format data


(number, text, date, …)

Combine mutiple data sources

Query

Query Data Clean Data Analyse / Visualize Data


Understanding Append

Country Revenue Cost Year


Germany 100 -20 2016
Germany 108 -22 2017
Germany 105 -25 2018

Country Revenue Cost Year


Germany 110 -24 2019
Germany 116 -25 2020
Germany 122 -27 2021
Understanding Append

Country Revenue Cost Year Country Revenue Cost Year


Germany 100 -20 2016 Germany 100 -20 2016
Germany 108 -22 2017
Germany 108 -22 2017
Germany 105 -25 2018
Germany 105 -25 2018

Country Revenue Cost Year Germany 110 -24 2019


Germany 110 -24 2019
Germany 116 -25 2020
Germany 116 -25 2020
Germany 122 -27 2021 Germany 122 -27 2021
Transpose

Column1 Column2 Column3 Columns


First Name Manu Max

Columns Second Name Lorenz Schwarz RowsRows


Age 34 32
Transpose

Column1 Column2 Column3

First Name Manu Max

Columns Second Name Lorenz Schwarz Rows


Age 34 32

Columns First Name Second Name Age

Manu Lorenz 34
Rows
Max Schwarz 32
Pivoting & Unpivoting
Attribute
Unpivot
Product 2019 2020 2021
Apple 10 12 13
Banana 23 25 21

Value
Product Attribute Value
Apple 2019 10
Apple 2020 12
Apple 2021 13
Banana 2019 23
Banana 2020 25
Pivot
Banana 2021 21
Query Editor Deep Dive
Understanding Data Modeling
Module Content

Data Modeling Theory

Understanding & Creating the Star Schema

Diving Deeper Into Selected Query Editor Features


& Understanding Basic Mathematical Calculations
The Current State & Next Steps
Source File Connection
Country-id country … population

Row & Column Operations 36 australia … 711.4


276 germany … 1738.8
Filtering Data … … … …

Appending Queries Basic Cleaning & Shaping

Pivoting & Unpivoting

Formatting data

Handling errors Develop &


Create Data Model
Splitting & Extracting Data
Data Models – What & Why?

Data Warehouse Data Model Multidimensional Schema

Structured & logical


Model different dimensions to
Large store of data retrieved organization of data elements
keep track of entities / actions
from various sources designed (e.g. tables) and the relationship
concerning the warehouse‘s
to enable BI activities between different data
actitivies
elements

sales

product customer sales

product customer
The Star Schema – An Example

DIM products customers DIM FACT


product-id FACT customer-id
Central & (Typically)
type first-name
Single Table
color second-name
sales age Foreign Keys +
product-id gender Quantitative Information
date-id
DIM time
customer-id
date-id
location-id DIM DIM
year location
units-sold
quarter location-id (At Least) One Table
total-sales with Primary Keys
month continent
total-cost
week country Supporting Information
day city For FACT Table
Applying the Star Schema to the Course Project

DIM-region FACT-population DIM-age


country-id country-id age-group-id
pop-2010-2040
country age-group-id age-group
country-id
gender-id category
country
year
year
population
age-group
gender
population
DIM-gender
gender-id
gender

Single Table
VS Multidimensional (Star) Schema
Reference vs Duplicate

Query 1 Query 2
Reference
Applied Steps Applied Steps

Query refers to
Changes in Query 1
Filtered Data “final state” of initial
have an effect on
Changed Data Type query, no applied steps
Query 2
displayed

Query 1 ”Copy” of Query 1


Duplicate
Applied Steps Applied Steps

Changes in Query 1
Filtered Data Filtered Data
have no effect on
Changed Data Type Changed Data Type
Query 2
Merging Queries - Theory
Equal column name
sales & data type

cust-id product price


1 tv 599
7 notebook 1.299
1 phone 849 sales + customers merged

cust-id product price first second


1 tv 599 max schwarz
customers
7 notebook 1.299 manu lorenz
cust-id first second 1 phone 849 max schwarz
1 max schwarz
7 manu lorenz
Understanding “Join Kind“

LEFT FULL RIGHT


ID Sales Region ID Sales Region ID Region Sales

A 10 USA A 10 USA A USA 10


ID Sales
OUTER
LEFT QUERY

B 50 n/a B 50 n/a BB Europe n/a


A 10
C 20 Asia C 20 Asia C Asia 20
B 50
BB n/a Europe
C 20

ID Region
RIGHT QUERY

LEFT RIGHT
A USA ANTI
ID Sales Region ID Region Sales
BB Europe B 50 n/a BB Europe n/a
C Asia

INNER
ID Sales Region

A 10 USA

C 20 Asia
Adding More DIM Tables

DIM-region FACT-population DIM-age


country-id country-id age-group-id
country age-group-id age-group
region gender-id category
year
population

DIM-gender
gender-id
gender

Multidimensional (Star) Schema


The DIM-age Table

age-group-id age-group max category


1 0-4 4 Baby
2 5-9 9 Child
DIM-age 3 9-14 14 Child
age-group-id … … … …
age-group
category Bring “age-group” column back to project and
1
extract maximum value from each group

Add Conditional Column to define category


2
based on maximum value for each age-group

3 Add automatically generated Index Column


The FACT Table

DIM-region FACT-population DIM-age


country-id country-id age-id Quantitative Information
country age-id age-group
region gender-id age-max
Foreign Keys to combine
year category
quantitative data
population with descriptive data
from DIM tables

DIM-gender Missing link between tables


gender-id to be added outside the
Query Editor in the “Data
gender
Model“ module

Multidimensional (Star) Schema


Understanding “Enable Load“

<
Query 1 Query 2
Query Editor Enable Load Enable Load
Query 1 + 2
Enable Load

Data Model
Data View & Relationships
Leaving the Query Editor
Module Content

Understanding Relationships

M-Language vs DAX & DAX Introduction

Working with Calculated Columns & Measures


The Power BI Desktop Workflow

Query Editor
Query Editor Extract
Clean &
Transform
Data Preparation Transform
Load

Data Model
The Power BI Desktop Workflow

Query Editor
Query Editor Extract
Clean &
Transform
Data Preparation Transform
Load

Data Model
Data & Model View View & Edit
Inspect, Explore &
Relationships
Understand Data
Data Analysis between Tables

Report View
Create Reports with
Multiple Visuals
Data Visualization
Query Editor vs Data Model

(Power) Query Editor

Prepare / Transform Data Data Model

Analyze Data

Relationships
Calculations can be applied in both the
Query Editor and the Data Model
Calculations
Relationships to the Rescue!

DIM-country DIM-gender

ID ID

FACT-population

ID ID ID

DIM-age

ID
Understanding Relationships

Cardinality Cross Filter Direction Active Properties

Relationship Type
Different Kinds Of Data Relationships

One-to-Many Many-to-Many One-to-One


(1:n) (n:n) (1:1)

One record in table A


One record in table A has One record in table A has
belongs to exactly one
one or many related records one or many related tables
record in table B – and vice
in table B in table B – and vice versa
versa

e.g. an employee has exactly


e.g. an employee belongs to e.g. an employee is part of
one intranet account and
one company but a multiple projects and every
every intranet account
company has many project has multiple
belongs to exactly one
employees employees assigned to it
employee
One to Many (1:*)
1:*

companies employees

id name … id company-id first-name

1 Apple … 1 3 Max

2 Microsoft … 2 1 Manu

3 Amazon … 3 1 Sarah

“One”: Unique entry for primary key


”Many”: One or multiple entries for foreign key
One to One (1:1)
1:1

employees accounts

id first-name … id employee-id created

1 Max … 1 1 01.02.2008

2 Manuel … 2 2 27.08.1999

3 Sarah … 3 3 16.11.2018

“One”: Unique entry for primary key


”One”: Unique entry for foreign key
Many-To-Many Relations Need Intermediate Tables
Direct
“connection” (via
employees foreign keys in projects
“employees” or
id first-name … “projects”) is not id title …
possible
1 Max … 1 Learn Power BI …

2 Manu … 2 Query Data …

3 Julie … 3 Create Visual …

n:n
One employee can be assigned to many projects and one
project may be handled by multiple employees
Many-To-Many Relations Need Intermediate Tables

employees projects

id first-name … id title …

1 Max … 1 Learn Power BI …

2 Manu … 2 Query Data …

3 Julie … 3 Create Visual …


n:n
One employee can be assigned to many projects and one
project may be handled by multiple employees
projects-employees
An “intermediate
table” is created and id employee-id project-id One row per relation
used to store the
between the two
relations between 1 2 1 “main tables”
“employees” and
“projects” 2 3 1
Understanding Relationships

Cardinality Cross Filter Direction Active Properties

Relationship Type Table “Communication”


Understanding Relationships

Cardinality Cross Filter Direction Active Properties

Activate / Deactivate
Relationship Type Table “Communication”
Relationship
M vs DAX (Data Analysis Expressions)

Description Application

Power Query Formula


Data Preparation
Language
M
Data Transformation Before Data Model

Data Analysis Expression


Create Insights
Language

DAX Analytical Data Calculations In Data Model

Comparable to Excel
Functions
DAX Basics

DAX Reference https://docs.microsoft.com/en-us/dax/

Syntax Formula = …

Data Types String Number …

Operators + - …

Functions CONCATENATE()
Basics

Advanced
DAX Statements DEFINE EVALUATE ORDER BY VAR

DAX Queries
The Core DAX Syntax

Total Population = SUM ( FactPopulation [ PopulationCount ] )

Formula Name
• Capital Letters Column Reference
• Space • Square Brackets
• Capital Letters
• No Space

Table Reference
With space in table names, single
• Capital Letters
quotes are required
• No Space

DAX Function
DAX Data Types

String (Text) “The DAX Basics“

Whole & Decimal Numbers 564 949.59

Boolean TRUE FALSE

Date/Time January 1st 2020

Currency

Blank (NA)
DAX Operators

Arithmetic Comparison Logical Text concat.

+ = && &

- == ||

* > IN

/ >=

^ <>
DAX Core Functions

Type Function Output

Text CONCATENATE(“I Love Power”,”BI”) I Love PowerBI

Information ISNUMBER(2020) TRUE

Logical IF([Population]>100000,“Big“,“Small“) Big Small

Math ROUND(352.867, 2) 352.87

Statistical AVERAGE(Fact-Pop[Population])

Filter FILTER(Fact-Pop[Year]=2020)

Date & Time CALENDAR(DATE(2000,01,01),DATE(2020,12,31))


Calculated Column or Measure?

Calculated “Perform an operation that generates


Column results for each row of your table“

“Return a single result of a calculation or


Measure
an aggregated value (e.g. Averages)“
The ”FILTER” & “CALCULATE” Functions
Function ‘FACT-population’ [gender]=”Female”

FILTER ( <table> , <filter> )

SUM(’FACT-population’[population])

CALCULATE ( <expression> , )
The ”FILTER” & “CALCULATE” Functions

SUM(’FACT-population’[population])

Filter function

CALCULATE ( <expression> , FILTER ( <table> , <filter> ) )

’FACT-population’[gender]=”Female”

CALCULATE ( <expression> , <filter1> , <filter2> )


Argument
The Report View
Creating Beautiful Visuals & Reports
Module Content

Creating Visuals & Reports

Formatting Visuals / Charts & Understanding Report


Themes

Working with Filters, Hierarchies & Interactions


A (Final) Look at the Power BI Desktop Workflow

Query Editor
Query Editor Extract
Clean &
Transform
Data Preparation Transform
Load

Data Model
Data & Model View View & Edit
Inspect, Explore &
Relationships
Understand Data
Data Analysis between Tables

Report View
Create Reports with
Multiple Visuals
Data Visualization
Basic Visual Elements

Tooltip
Value
Senior 32%

Legend

Total
GER
USA
2000 2010 2020

Axis
Power BI Pro & Mobile
Sharing & Collaborating
Module Content

Understanding the Relationship between Power BI Desktop


& Power BI Pro

Diving Into Workspaces to Collobarate on Projects

Sharing Data between Power BI Desktop, Power BI Pro &


Power BI Mobile
The Next Steps

Single User Organization

Power BI Desktop Power BI Desktop

Publish Publish

STOP Power BI Pro Power BI Pro

IT
Access Share

Power BI Mobile Power BI Pro

Marketing Power BI Mobile


Publishing From PBI Desktop to PBI Pro

Power BI Desktop

Our Computer Server

Publish/Connect Personal Gateway Standard Gateway

Report + Dataset

Power BI Pro Power BI Pro


Workspaces, Apps & Content Packs

Power BI Pro

My (“Your“) Workspace “Other“ Workspaces


“Your personal cloud workspace“ “Company-wide collaboration workspace“

Datasets Dataset Dataset

Reports Report Report

Dashboard Dashboard Dashboard

App Content Pack

Sharing Sharing
Sharing Data: Workspace or App?

My Workspace Single Developer

Workspace Multiple Developers

App End-User

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy