0% found this document useful (0 votes)
76 views201 pages

Up & Running With

This document outlines a project-based course for learning Power BI Desktop, focusing on practical skills for business intelligence. It includes resources such as a downloadable eBook, quizzes, assignments, and a bonus project, along with a detailed course outline covering key topics like data connection, modeling, and visualization. The course aims to provide foundational skills in Power BI while emphasizing hands-on learning and real-world application.

Uploaded by

Rithu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views201 pages

Up & Running With

This document outlines a project-based course for learning Power BI Desktop, focusing on practical skills for business intelligence. It includes resources such as a downloadable eBook, quizzes, assignments, and a bonus project, along with a detailed course outline covering key topics like data connection, modeling, and visualization. The course aims to provide foundational skills in Power BI while emphasizing hands-on learning and real-world application.

Uploaded by

Rithu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 201

UP & RUNNING WITH

COURSE STRUCTURE

This is a project-based course designed for students looking for a practical, hands-on, and
highly engaging approach to learning Power BI Desktop for business intelligence

Course resources include:

Downloadable PDF eBook (200+ pages) containing all course slides, assignments
and reference materials

Quizzes and Assignments to reinforce key concepts and simulate real-world


scenarios, with step-by-step solution videos

Complete Bonus Project to test your abilities and apply the skills developed
throughout the course to a brand-new data set
COURSE OUTLINE

Installing Power BI Desktop, exploring the Power BI


1 Introducing Power BI Desktop workflow, comparing Power BI vs. Excel, etc.

Connecting to data, shaping & transforming tables, using


2 Connecting & Shaping Data profiling tools, editing, merging & appending queries, etc.

Building relational models, creating table relationships,


3 Creating a Data Model understanding cardinality and filter flow, etc.

Understanding DAX syntax, adding calculated columns and


4 Calculating Measures with DAX measures, writing common formulas and functions, etc.

Inserting charts and visuals, customizing formats, editing


5 Visualizing Data with Dashboards interactions, applying filters and bookmarks, etc.

Exploring common Power BI optimization tools within the


6 Optimizing Power BI Performance Optimize and External tools menus
COURSE PROJECT

THE You’ve just been hired as a Business Intelligence Analyst by AdventureWorks*, a global
SITUATION manufacturing company that produces cycling equipment and accessories

The management team needs a way to track KPIs (sales, revenue, profit, returns), compare
THE regional performance, analyze product-level trends, and identify high-value customers.
BRIEF All you’ve been given is a folder of raw csv files, which contain information about
transactions, returns, products, customers, and sales territories.

Use Power BI Desktop to:


THE • Connect and transform the raw data
OBJECTIVE •

Build a relational data model
Create calculated columns and measures with DAX
• Design an interactive dashboard to visualize the data

*This data is provided by Microsoft for informational purposes only as an aid to illustrate a concept. These samples are provided “as is” without warranty of any kind. The example companies, organizations, products, domain names, e-
mail addresses, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, person, place, or event is intended or should be inferred.
SETTING EXPECTATIONS

1 What you see on your screen may not always match mine
• Power BI Desktop features are updated frequently, with new versions released each month
• NOTE: Power BI is currently only compatible with PC/Windows (not available for Mac)

2 This course is designed to help you build foundational skills


• Our goal is to help you build a deep foundational understanding of the Power BI desktop workflow; some topics
may be simplified, and we won’t cover some advanced tools (M code, advanced DAX, R/Python visuals, etc.)

3 This is a hands-on and project-based learning experience


• You will get the most value out of this course if you follow along closely with the demos and assignments; we’ll be
working through the entire BI workflow to create a professional-quality dashboard from scratch

4 We will not cover Power BI Service as part of this course


• This course focuses on Power BI Desktop specifically; online sharing and collaboration features (app.powerbi.com)
require a separate account and are covered in-depth in a separate course
INTRODUCING POWER BI
MEET POWER BI

In this section we’ll introduce Power BI Desktop, review the download and installation
process, adjust default settings, and explore the Power BI interface and workflow

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:

• Download and install Power BI Desktop, and adjust the


Introducing Power BI Power BI vs. Excel settings for our course project

• Understand the role that Power BI plays within the broader


Installation Options Adjusting Settings Microsoft ecosystem

• Explore core components of the Power BI Desktop interface


Interface & Workflow Helpful Resources
• Review the business intelligence workflow that we’ll follow
as we build our course project
MEET POWER BI

Microsoft Power BI is a self-service business intelligence


platform, which includes both desktop and web-based
applications for connecting, modeling, and visualizing data

Learn more at powerbi.microsoft.com


WHY POWER BI?

Connect, transform and load millions of rows of data


• Access data from virtually anywhere (database tables, flat files, web, cloud services, folders, etc.), and create
fully automated workflows to extract, transform and load data for analysis

Build relational models to blend data from multiple sources


• Create table relationships to analyze holistic performance across an entire relational data model

Define complex calculations using Data Analysis Expressions (DAX)


• Enhance datasets and enable advanced analytics with powerful and portable DAX expressions

Bring data to life with interactive reports and dashboards


• Build professional-quality reports and dashboards with best-in-class visualization tools

Develop a versatile, in-demand skill set


• Power BI is the industry leader in self-service BI, and the skills you build in this course will be highly transferrable
EXCEL VS. POWER BI

EXCEL POWER BI

Excel and Power BI are


Spreadsheets Report View
built on top of the same
analytics engines
• Power BI takes the same
Power Query data transformation and
PivotTables Custom Visuals modeling capabilities and
Data Model adds powerful visualization
and publishing tools
DAX
A1 Notation Interactive Dashboards • Transitioning is easy; you can
import an entire data model
directly from Excel!

Cell Formulas Power BI Service


INSTALLING POWER BI DESKTOP

1) Download from Microsoft store 2) Download manually from web 3) Install as part of Microsoft 365
apps.microsoft.com powerbi.microsoft.com/downloads microsoft.com/en-us/microsoft-365

• Power BI Desktop is included as part of select


enterprise Office/Microsoft 365 subscriptions
Get • If your company uses a compatible version of
Microsoft 365, talk to an admin about getting
access to Power BI

• Windows handles automatic updates • No automatic updates (allows version control)


• Updates only elements that have been changed • Downloads an executable installation file HEY THIS IS IMPORTANT!
• Doesn’t require administrator access • Administrator access may be required You do NOT need to register for a Power BI
Pro account to access Power BI Desktop
POWER BI SETTINGS
Global > Preview Features Current File > Data Load Current File > Regional Settings

Select all available preview features by default Make sure the following options are NOT selected: Select “English (United States)” from the
(these change with each monthly release) • Update or delete relationships when refreshing data dropdown menu (this will align with the data
• Autodetect new relationships after data is loaded in course project files)
• Time Intelligence > Auto date/time

HEY THIS IS IMPORTANT!


Options under CURRENT FILE need to be adjusted every time you open a new Power BI workbook (these settings do not persist across new .pbix files)
POWER BI WORKFLOW

Raw data is extracted and transformed in the Power


Query editor, then loaded to the Power BI “front-end”

Power Query Editor Model View Data View Report View

Power BI “Back-End” Power BI “Front-End”


POWER BI WORKFLOW

Power Query Editor Model View Data View Report View


Data is loaded &
transformed in the
Power Query Editor
POWER BI WORKFLOW

Power Query Editor Model View Data View Report View


Data is loaded &
transformed in the
Power Query Editor

Data models are


configured in the
Model View
POWER BI WORKFLOW

Power Query Editor Model View Data View Report View


Data is loaded &
transformed in the
Power Query Editor

Data models are


configured in the
Model View

Table features &


calculations are added
in the Data View
POWER BI WORKFLOW

Power Query Editor Model View Data View Report View


Data is loaded &
transformed in the
Power Query Editor

Data models are


configured in the
Model View

Table features &


calculations are added
in the Data View

Visuals & reports


are designed in the
Report View
HELPFUL RESOURCES

The Help tab includes documentation,


training videos, sample files, templates, and
links to support blogs and communities

Update Screenshot

The Microsoft Power BI blog The Microsoft Power BI YouTube Power BI User Groups (Power BIUG)
(powerbi.microsoft.com/blog) Channel publishes demos, feature are communities of users, which
publishes monthly summaries summaries, and advanced tutorials include both local meet-ups and helpful
to showcase new features (check out “Guy in a Cube” too!) online forums (pbiusergroup.com)
MONTHLY UPDATES

Power BI is updated monthly, so you may notice ongoing changes to settings, options, tools, etc.
Reference the links below to stay up-to-date on product updates and new feature releases:

Power BI Desktop
https://docs.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update

Power BI Service
https://docs.microsoft.com/en-us/power-bi/fundamentals/service-whats-new

Power Platform
https://learn.microsoft.com/en-us/dynamics365/release-plans/
CONNECTING & SHAPING DATA
CONNECTING & SHAPING DATA

In this section we’ll connect to source files and cover some of the most common techniques
for extracting, cleaning, and shaping data to prepare it for modeling and analysis

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:

• Explore Power BI’s query editor and understand the role that
Intro to Power Query Data Connectors Power Query plays in the larger BI workflow

• Introduce different types of connectors and connectivity


The Query Editor Connection Modes modes available for getting data into Power BI
• Review tools for checking data quality and key profiling metrics
like column distribution, empty values, errors and outliers
Data QA & Profiling Table Transformations
• Transform tables using text, numerical and date/time tools,
pivot and group records, and create new conditional columns
Calendar Tools Combining Queries
• Practice combining, modifying and refreshing queries
FRONT-END VS. BACK-END
Power BI Desktop essentially has two distinct environments: a front-end and a back-end
• The front-end includes the Data, Model & Report views, where most of the modeling, analysis and visualization takes place
• The back-end includes the Power Query Editor, where raw data is extracted, transformed, and loaded to the front-end (ETL)

BACK-END FRONT-END

• Connect & extract data using pre-built connectors • Build data models by creating table relationships
between primary and foreign keys
• Profile & QA the data to explore, clean and prepare it
for modeling and analysis • Add calculated measures & columns using Data
Analysis Expressions (DAX)
• Transform & shape tables to add new features, modify
values, group records, or sort and filter columns • Design reports to visualize the data and create
interactive, dynamic dashboards
• Merge or append queries to join and combine them
prior to loading to the front-end • Publish & share your Power BI workbooks using
Power BI Service (cloud application)
• Perform advanced transformations using custom M
code (out of scope for this course)
TYPES OF DATA CONNECTORS

Power BI can connect to virtually any type of


source data, including (but not limited to):
• Flat files & Folders (csv, text, xlsx, etc.)
• Databases (SQL, Access, Oracle, IBM, etc.)
• Power Platform (Datasets, Datamarts, Dataflows,
Dataverse, etc.)

• Azure (Azure SQL, Analysis Services, Databricks, etc.)

• Online Services (SharePoint, GitHub, Dynamics 365,


Google Analytics, Salesforce, Power BI Service, etc.)
• Other (Web feeds, R scripts, Spark, Hadoop, etc.)
POWER QUERY EDITOR

Query Editing Tools (Table transformations, calculated columns, etc.)

Formula Bar (this is “M” code)

Table Name &


Properties

Queries Pane
(list of all queries) Applied Steps
(like a macro)

Table Preview
*In older versions of Power BI, the Transform Data option may be named “Edit Queries”
QUERY EDITING TOOLS

The HOME tab includes general settings and common table transformation tools

The TRANSFORM tab includes tools to modify existing columns (splitting/grouping, transposing, extracting text, etc.)

The ADD COLUMN tools create new columns (based on conditional rules, text operations, calculations, dates, etc.)
BASIC TABLE TRANSFORMATIONS
Sort values (A-Z, Low-High, etc.) Change data type (date, $, %, text, etc.)

Promote
headers

Duplicate, move or
rename columns
Choose or remove columns
Tip: Right-click column headers
Tip: use the “Remove Other Columns” to access common tools
option if you always want a specific set

Keep or remove rows


Tip: use “Remove Duplicates” to create
new lookup tables from scratch
ASSIGNMENT: TABLE TRANSFORMATIONS

Key Objectives
NEW MESSAGE
1. Create queries to connect to the two new .csv files
From: Ethan T. Langer (Analytics Manager) 2. Name your queries Product Category Lookup and Product
Subject: Welcome aboard! Subcategory Lookup

3. Confirm that column headers have been promoted and that


Hello, and welcome to the team! all data types are correct
We’re excited that you’ll be helping us develop our new internal
reports in Power BI. Looks like you’ve already gotten started, but 4. Add a new column to extract all characters before the dash
we have some new data to add to the model. ("-") in the Product SKU column, and name it ”SKU Type”
Could you please create two new queries to connect to the
5. Update the SKU Type calculation above to return all
Product Category Lookup and Product Subcategory Lookup
files attached, and help with a few modifications to the product characters before second dash, instead of the first
table?
6. Replace zeros (0) in the Product Style column with “NA”
Thanks!
-ETL 7. Close and load to your data model

Product Category Lookup


Product Subcategory Lookup
SOLUTION: TABLE TRANSFORMATIONS

Solution Preview
NEW MESSAGE

From: Ethan T. Langer (Analytics Manager)


Subject: Welcome aboard!

Hello, and welcome to the team!


We’re excited that you’ll be helping us develop our new internal
reports in Power BI. Looks like you’ve already gotten started, but
we have some new data to add to the model.
Could you please create two new queries to connect to the
Product Category Lookup and Product Subcategory Lookup
files attached, and help with a few modifications to the product
table?

Thanks!
-ETL

Product Category Lookup


Product Subcategory Lookup
CONNECTING TO A DATABASE

Power Query can connect to data from various database sources including SQL Server, MS Access, MySQL,
PostgreSQL, Oracle, SAP, and more

Select tables & transform


Get Data & enter credentials

Write custom or advanced queries with SQL statements (optional)


EXTRACTING DATA FROM THE WEB

Power Query includes a native Web connector for importing web-hosted files (csv, xlsx, etc.) or scraping
URLs for anything that Power Query can identify as a structured table

https://en.wikipedia.org/wiki/List_of_asset_management_firms
TEXT TOOLS

Split a text column based on a


specific delimiter, number of
characters, or other attributes

Extract characters from text


based on fixed lengths, first/last
characters, ranges or delimiters

HEY THIS IS IMPORTANT! Format a text column to upper, lower or proper case,
You can access many tools from both the Transform and or add a prefix or suffix
Add Column menus - the difference is whether you want to Tip: Use “Trim” to eliminate leading & trailing spaces, or
ADD a new column or OVERWRITE an existing one “Clean” to remove non-printable characters
ASSIGNMENT: TEXT TOOLS

Key Objectives
NEW MESSAGE
1. Duplicate the email address column and name it
From: Ethan T. Langer (Analytics Manager) “Domain Name”
Subject: Customer domains 2. In the new column, remove all text/characters except
for the domain name
Hi! 3. Use transformation steps to clean up and capitalize the
We’re looking to better understand where our customers may be domain names (i.e. “Adventure Works”)
coming from, based on their email domains.
4. Save & Apply changes
Could you please create a new column in the customer table that
will allow us do this?

Thanks!
-ETL
SOLUTION: TEXT TOOLS

Solution Preview
NEW MESSAGE

From: Ethan T. Langer (Analytics Manager)


Subject: Customer domains

Hi!

We’re looking to better understand where our customers may be


coming from, based on their email domains.

Could you please create a new column in the customer table that
will allow us do this?

Thanks!
-ETL
NUMERICAL TOOLS

Information tools allow you to


define binary flags (1/0 or
TRUE/FALSE) to mark rows as
even, odd, positive or negative
Standard Scientific Trigonometry
Statistics functions allow you to evaluate
basic stats for a selected column (sum, Standard, Scientific and Trigonometry tools allow you to apply
min/max, average, count, count distinct, etc.) standard operations (addition, multiplication, division, etc.) or
more advanced calculations (power, logarithm, sine, tangent,
Note: These tools return a SINGLE value, and are etc.) to each value in a column
commonly used to explore a table rather than
prepare it for loading Note: Unlike the Statistics tools, these are applied to each row in the table
ASSIGNMENT: NUMERICAL TOOLS

Key Objectives
NEW MESSAGE
1. What is our average product cost?
From: Ethan T. Langer (Analytics Manager) 2. How many colors do we sell our products in?
Subject: Need some stats for leadership
3. How many distinct customers do we have?

Hi again, 4. What is the maximum annual customer income?


Leadership is asking us to validate some high-level stats about 5. Return the tables to their original state
our products and customers. Can you please help me answer the
following questions?
We don’t really need to store these values anywhere, so make
sure to restore the tables back to their original state once you’re
done pulling the stats.

Thank you!
-ETL
SOLUTION: NUMERICAL TOOLS

Solution Preview
NEW MESSAGE
1. What is our average product cost? ($413.66)
From: Ethan T. Langer (Analytics Manager) 2. How many colors do we sell our products in? (10)
Subject: Need some stats for leadership
3. How many distinct customers do we have? (18,148)

Hi again, 4. What is the maximum annual customer income? ($170k)


Leadership is asking us to validate some high-level stats about 5. Return the tables to their original state
our products and customers. Can you please help me answer the
following questions?
We don’t really need to store these values anywhere, so make
sure to restore the tables back to their original state once you’re
done pulling the stats.

Thank you!
-ETL
DATE & TIME TOOLS

Date & Time tools are relatively straight-forward, and include the following options:
• Age: Difference between the current date and the date in each row

• Date Only: Removes the time component from a date/time field

• Year/Month/Quarter/Week/Day: Extracts individual components from a date field (time-


specific options include Hour, Minute, Second, etc.)

• Earliest/Latest: Evaluates the earliest or latest date from a column as a single value (can
only be accessed from the “Transform” menu)
Note: You will almost always want to perform these operations from the “Add Column” menu to build out new fields,
rather than transforming an individual date/time column

PRO TIP: Load up a table containing a single date column and use Date tools to build out an entire calendar table
CREATING A CALENDAR TABLE

Use the Date options in the


Add Column menu to quickly
build out an entire calendar
table from a list of dates
ASSIGNMENT: CALENDAR TABLES

Key Objectives
NEW MESSAGE
Add the following columns to the calendar table:
From: Ethan T. Langer (Analytics Manager) 1. Month Name (e.g. “January”)
Subject: New date fields
2. Month Number (e.g. “1”)

Hi, 3. Start of Year (e.g. “1/1/2020”)

We need to add a few fields to our calendar table to help us 4. Year (e.g. “2020”)
analyze sales trending over time.

Could you please add the following columns when you get a
chance?

Thanks!
-ETL
SOLUTION: CALENDAR TABLES

Solution Preview
NEW MESSAGE

From: Ethan T. Langer (Analytics Manager)


Subject: New date fields

Hi,

We need to add a few fields to our calendar table to help us


analyze sales trending over time.

Could you please add the following columns when you get a
chance?

Thanks!
-ETL
INDEX COLUMNS

Index Columns contain a list of sequential


values that can be used to identify each unique
row in a table (typically starting from 0 or 1)

These are often used to create unique IDs that


can be used to form relationships between
tables (more on that later!)
CONDITIONAL COLUMNS

Conditional Columns allow you to define new fields based


on logical rules and conditions (IF/THEN statements)

Here we’re creating a conditional column named Quantity


Type, which is based on Order Quantity:
• If Order Quantity =1, Quantity Type = “Single Item”
• Else If Order Quantity >1, Quantity Type = “Multiple Items”
• Else; Quantity Type = “Other”
GROUPING & AGGREGATING

Group By allows you to aggregate data at a different level or “grain”


(i.e. group daily records into monthly, aggregate transactions by store, etc.)

Here we’re transforming a daily, transaction-level table into a


summary of Total Quantity by Product Key

NOTE: Any fields not specified in the Group By settings are lost
GROUPING & AGGREGATING

This time we’re transforming the daily, transaction-level table into a summary of Total
Quantity grouped by both Product Key and Customer Key (using the “Advanced” option)

NOTE: This is like creating a PivotTable in Excel and pulling in Sum of Order Quantity with
Product Key and Customer Key as row labels
PIVOTING & UNPIVOTING

Pivoting describes the process of turning distinct row values into columns, and unpivoting describes
the process of turning distinct columns into rows

Imagine the table on a hinge; pivoting rotates


it from vertical to horizontal, and unpivoting
rotates it from horizontal to vertical

NOTE: Transpose works very similarly, but


doesn’t recognize unique values; instead, the
entire table is transformed so that each row
becomes a column and vice versa
MERGING QUERIES

Merging queries allows you to join tables based


on a common column (like a lookup in Excel)

In this case we’re merging the Sales Data table with the Product
Lookup table, which share a common Product Key column

NOTE: Merging adds columns to an existing table/query

HEY THIS IS IMPORTANT!


Just because you can merge tables, doesn’t
mean you should!
In many cases, it’s better to keep tables
separate and define relationships between
them in the data model (more on that soon!)
APPENDING QUERIES

Appending queries allows you to combine or stack tables


sharing the exact same column structure and data types

Here we’re appending the AdventureWorks Sales 2020 table to the


AdventureWorks Sales 2021 table, which is valid since they share
identical table structures

NOTE: Appending adds rows to an existing table/query

PRO TIP: Use the Folder option (Get Data > More > Folder) to append all files within a specified folder (assuming
they share the same structure); as you add new files, simply refresh the query and they will automatically append!
PRO TIP: APPENDING FILES FROM A FOLDER
DATA SOURCE SETTINGS

Data Source Settings allow you to manage existing data connections, file paths and permissions

HEY THIS IS IMPORTANT!


Connections to local files reference the exact file
path, so if the file name or location changes you will
need to update your data source settings
PRO TIP: DATA SOURCE PARAMETERS

Use parameters to dynamically manage and update connection paths in the Power Query editor

Parameter name
(Name of the query/table)

Parameter type
(Any value, text, date, etc.)

Parameter value
(Any value, list, query)
Update Server & Database connection
text values with parameters

Parameter type
(Default & current)
REFRESHING QUERIES

By default, all queries will refresh when you use the


Refresh command from the Home tab

From the Query Editor, uncheck Include in report refresh


to exclude individual queries from the refresh

PRO TIP: Exclude queries from refresh that don’t


change often (like lookups or static data tables)
POWER QUERY BEST PRACTICES

Get organized before connecting and loading data


• Define clear and intuitive table/query names from the start, and establish an organized file/folder structure if
you are working with local flat files to avoid changes to file names or paths

Disable report refresh for any static data sources


• There’s no need to constantly refresh data sources that don’t change, like lookups or static data tables

When working with large tables, only load the data you need
• Don’t include hourly data when you only need daily, or transaction-level data when only need a product-level
summary (extra data will only slow your report down!)
CREATING A DATA MODEL
CREATING A DATA MODEL

In this section we’ll cover foundational data modeling topics like normalization, fact and
dimension tables, primary and foreign keys, relationship cardinality and filter flow

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:

• Understand the basic principles of data modeling, including


Data Modeling 101 Normalization normalization, fact & dimension tables and common schemas

• Create table relationships using primary and foreign keys, and


Facts & Dimensions Primary & Foreign Keys discuss different types of relationship cardinality

• Configure report filters and trace filter context as it flows


Cardinality Filter Flow between related tables in the model

• Explore data modeling options like hierarchies, data categories


Common Schemas Hierarchies and hidden fields
WHAT IS A DATA MODEL?

This IS NOT a data model


• This is a collection of independent tables,
which share no connections or relationships

• If you tried to visualize Orders and Returns


by Product, this is what you’d get
WHAT IS A DATA MODEL?

This IS a data model!


• The tables are connected via relationships,
based on a common field (Product Key)

• Now Sales and Returns data can be filtered


using fields from the Product Lookup table!
DATABASE NORMALIZATION
Normalization is the process of organizing the tables and columns in a relational
database to reduce redundancy and preserve data integrity. It’s commonly used to:
• Eliminate redundant data to decrease table sizes and improve processing speed & efficiency
• Minimize errors and anomalies from data modifications (inserting, updating or deleting records)
• Simplify queries and structure the database for meaningful analysis

In a normalized database, each table should serve a distinct and specific purpose
(i.e. product information, transaction records, customer attributes, store details, etc.)

Models that aren’t normalized contain redundant,


duplicate data. In this case, all of the product-specific
fields could be stored in a separate table containing a
unique record for each product id

This may not seem critical now, but minor inefficiencies


can become major problems at scale!
FACT & DIMENSION TABLES
Data models generally contain two types of tables: fact (“data”) tables, and dimension (“lookup”) tables:
• Fact tables contain numerical values or metrics used for summarization (sales, orders, transactions, pageviews, etc.)
• Dimension tables contain descriptive attributes used for filtering or grouping (products, customers, dates, stores, etc.)

This Calendar Lookup table contains attributes about each date (month, year, quarter, etc.)

This Product Lookup table contains attributes about each product_id (brand, SKU, price, etc.)

This Fact table contains quantity values, along


with date and product_id fields
PRIMARY & FOREIGN KEYS

Fact Table Calendar Lookup

Product Lookup

These are foreign keys (FK) These are primary keys (PK)
They contain multiple instances of each value, They uniquely identify each row of the table,
and relate to primary keys in dimension tables and relate to foreign keys in fact tables
RELATIONSHIPS VS. MERGED TABLES

Can’t I just merge queries or use lookup functions to pull everything into one single table?
- Anonymous confused man

Original Fact Table fields Attributes from Calendar Lookup table Attributes from Product Lookup table

You can, but it’s extremely inefficient!


• Merging tables creates redundancy and often requires significantly more memory and processing power to analyze
compared to a relational model with multiple small tables
THE MODEL VIEW

Menu Ribbon
(Home, Help)

Data / Field List

Model canvas

Model layout tabs Properties pane View Options


(Name, synonym, format, etc.) (Zoom, Reset Layout, Fit to Page)
CREATING TABLE RELATIONSHIPS

OPTION 1: Click and drag to connect primary OPTION 2: Add or detect relationships
and foreign keys within the Model view using the Manage Relationships dialog box
MANAGING & EDITING RELATIONSHIPS

Launch the Manage Relationships dialog box or Editing tools allow you to activate or deactivate relationships and
double-click a relationship to modify it manage cardinality and filter direction – more on that soon!
STAR & SNOWFLAKE SCHEMAS

A star schema is the simplest and most common A snowflake schema is an extension of a star,
type of data model, characterized by a single fact and includes relationships between dimension
table surrounded by related dimension tables tables and related sub-dimension tables
ASSIGNMENT: TABLE RELATIONSHIPS

Key Objectives
NEW MESSAGE 1. Delete all existing table relationships
From: Dana Modelle (Analyst) 2. Create a star schema by creating relationships
Subject: Need a favor… between the Sales, Calendar, Customer,
Product and Territories tables
Hey there, 3. Connect all three product tables (Product,
Ethan shared the data model you’ve been working on, and we Subcategory, Category) in a snowflake schema
might have an issue…
4. Use the matrix visual to confirm that you can
Last night I left my laptop open, and my cat Dennis somehow got
his paws on our model. Now all the relationships are gone!
filter Order Quantity values using fields from
each dimension table
Could you please rebuild the model, including all three product
tables? I owe you one!

-Dana
SOLUTION: TABLE RELATIONSHIPS

Solution Preview
NEW MESSAGE

From: Dana Modelle (Analyst)


Subject: Need a favor…

Hey there,

Ethan shared the data model you’ve been working on, and we
might have an issue…

Last night I left my laptop open, and my cat Dennis somehow got
his paws on our model. Now all the relationships are gone!

Could you please rebuild the model, including all three product
tables? I owe you one!

-Dana
PRO TIP: ACTIVE & INACTIVE RELATIONSHIPS

The Sales Data table contains two date fields (Order Date & Stock Date), but
there can only be one active relationship to the Date key in the Calendar table

You can set relationships to active or inactive from either the Edit Relationships
dialog box or the Properties (you must deactivate one before activating another)
PRO TIP: ACTIVE & INACTIVE RELATIONSHIPS

The Sales Data table contains two date fields (Order Date & Stock Date), but
there can only be one active relationship to the Date key in the Calendar table

You can set relationships to active or inactive from either the Edit Relationships
dialog box or the Properties (you must deactivate one before activating another)
RELATIONSHIP CARDINALITY

Cardinality refers to the uniqueness of values in a column


• Ideally, all relationships in the data model should follow a
one-to-many cardinality: one instance of each primary key,
and many instances of each foreign key

In this example there is only ONE instance of each Product Key in the Product
table (noted by a “1”), since each row contains attributes of a single product
(name, SKU, description, price, etc.)

There are MANY instances of each Product Key in the Sales table (noted by an
asterisk *), since there are multiple sales for each product
EXAMPLE: ONE-TO-ONE CARDINALITY
Product Lookup Price Lookup

• Connecting the two tables above using product_id creates a one-to-one relationship,
since each product ID only appears once in each table
• This isn’t necessarily a “bad” relationship, but you can simplify the model by merging the
tables into a single, valid dimension table

NOTE: this still respects the rules of


normalization, since all rows are unique
and capture product-specific attributes
EXAMPLE: MANY-TO-MANY CARDINALITY
Product Lookup Sales

• If we try to connect the tables above using product_id, we’ll get a many-to-many relationship
warning since there are multiple instances of product_id in both tables
• Even if we force this relationship, how would we know which product was actually sold on each
date – Cream Soda or Diet Cream Soda?
CONNECTING MULTIPLE FACT TABLES

This model contains two fact tables: Sales Data and


Returns Data
• Since there is no primary/foreign key relationship, we
can’t connect them directly to each other
• But we can connect each fact table to related lookups,
which allows us to filter both sales and returns data
using fields from any shared lookup tables
• We can view orders and returns by product since both
tables relate to Product Lookup, but we can’t view
returns by customer since no relationship exists

HEY THIS IS IMPORTANT!


Generally speaking, fact tables should connect through shared dimension tables, not directly to each other
FILTER CONTEXT & FLOW

Here we have two data tables (Sales Data and Returns Data),
connected to Territory Lookup

The arrows show the filter direction, and point from the one (1)
side of the relationship to the many (*) side
• When you filter a table, that filter context is passed to any
related “downstream” tables, following the arrow’s direction
• Filter context CANNOT flow “upstream”

PRO TIP: Arrange lookup tables above fact tables in your model as a visual reminder that filters always flow downstream
EXAMPLE: FILTER FLOW
In this model, the only way to filter both Sales and Returns data by
Territory is to use the Territory Key from the lookup table, which is
upstream and related to both fact tables

• Filtering using Territory Key from the Sales table yields incorrect Returns
values, since the filter context can’t flow to any other table

• Filtering using Territory Key from the Returns table yields incorrect Sales
values, and is limited to territories that exist in the returns table

Filtering by Returns Data[Territory Key]

Filtering by Territory Lookup[Territory Key] Filtering by Sales Data[Territory Key]


BI-DIRECTIONAL FILTERS

Updating the cross-filter direction from Single to Both allows


filter context to flow in either direction
• In this example, filters applied to the Sales table can pass up
to the Territory Lookup table, then down to Returns

*The “Apply security filter in both directions” option relates to row-level security (RLS) settings, which are out of scope for this course
EXAMPLE: BI-DIRECTIONAL FILTERS

With two-way cross-filtering enabled between Sales and Territory,


we now see correct values using Territory Key from either table
• Filter context can now pass up to the Territory Lookup table, then
downstream to Returns

• However, we still see incorrect values when filtering using Territory Key from
the Returns table, since the filter context is isolated to that single table

Filtering by Returns Data[Territory Key]


Filtering by Territory Lookup[Territory Key] Filtering by Sales Data[Territory Key]
EXAMPLE: BI-DIRECTIONAL FILTERS

In this case, we’ve enabled two-way cross-filtering between the


Returns and Territory tables
• As expected, we now see incorrect values when filtering using Territory Key
from the Sales table, since the filter context is isolated to that single table

• While the values appear to be correct when filtering using Territory Key
from the Returns table, we’re missing sales data from any territories that
didn’t appear in the returns table (specifically Territories 2 & 3)

Territories 2 & 3 don’t exist in


the Returns table, so they
aren’t included in the filter
context that passes to
Territory Lookup and Sales

Filtering by Returns Data[Territory Key]


Filtering by Territory Lookup[Territory Key] Filtering by Sales Data[Territory Key]
AMBIGUITY

Use two-way filters carefully, and only when necessary


• Using multiple two-way filters can cause ambiguity by introducing
multiple filter paths between tables

In this example, filter context from the Product table can pass down to
Returns and up to Territory Lookup, which would be filtered based on the
Territory Keys passed from the Returns table

With an active relationship between Product and Sales as well, filter context
could pass through either the Sales or Returns table to reach the Territory
Lookup table, which could yield conflicting filter context
PRO TIP: Design your models with one-way
filters and 1:many cardinality unless more
complex relationships are absolutely necessary
HIDING FIELDS

Hide in Report View makes fields inaccessible from the


Report tab, but still available in Data and Model views
• This can be controlled by right-clicking a field in the Data or Model
view, or by selecting “Is hidden” in the Properties pane
• This is commonly used to prevent users from filtering using invalid
fields, reduce clutter, or to hide irrelevant metrics from view

PRO TIP: Hide the foreign keys in fact tables to force


users to filter using primary keys in dimension tables
ASSIGNMENT: FILTER FLOW

Key Objectives
NEW MESSAGE 1. Replicate Larry’s matrix below to diagnose what
he must have done to the model*
From: Dana Modelle (Analyst)
Subject: Larry’s gone rogue!

Hey there, we’ve got another problem.

Larry from Sales just sent me this screenshot. I think he must


have downloaded our Power BI model and messed with some
relationships, because I KNOW we had sales for product 338.
Can you help diagnose what’s going on, and prevent him from
doing this again? • Which product is #338?
-Dana • Why didn’t Larry’s matrix show any orders?

P.S. Kevin says hi 2. Hide any remaining foreign keys to prevent


other users from making the same mistake

*Hint: you may need to temporarily change a relationship to bi-directional


SOLUTION: FILTER FLOW

Solution Preview
NEW MESSAGE 1. Larry must have changed the relationship
between Returns Data and Product Lookup to
From: Dana Modelle (Analyst)
bi-directional, and filtered his matrix using
Subject: Larry’s gone rogue! product_id from the Returns table

Hey there, we’ve got another problem.


• Road bike (Road-650 Black, 44)
Larry from Sales just sent me this screenshot. I think he must • Product 338 doesn’t exist in the Returns
have downloaded our Power BI model and messed with some table, so it was excluded when that filter
relationships, because I KNOW we had sales for product 338.
context passed to the Sales table
Can you help diagnose what’s going on, and prevent him from
doing this again? 2.
-Dana

P.S. Kevin says hi


PRO TIP: MODEL LAYOUTS

Model layouts allow you to create custom views to show specific portions of large, complex models
• Here we’ve created a Sales View displaying only tables related to sales, and a Returns View displaying only tables related
to returns (Note: this doesn’t actually create duplicate tables)
DATA FORMATS & CATEGORIES

Customize data formats from the Column tools menu in the


Data view or the Properties pane in the Model view

Assign data categories for geospatial fields,


URLs or barcodes
• This is commonly used to help Power BI map
location-based fields like addresses,
countries, cities, coordinates, zip codes, etc.
HIERARCHIES

Hierarchies are groups of columns that reflect multiple levels of granularity


• For example, a Geography hierarchy might include Country, State and City fields
• Hierarchies are treated as a single item in tables and reports, allowing users to “drill up” and “drill down” through each level

In the Data pane, right-click a field This hierarchy contains “Continent”, Right-click another field (like “Country”)
and select Create hierarchy and is named “Territory Hierarchy” and select Add to Hierarchy (or drag it in!)
ASSIGNMENT: HIERARCHIES

Key Objectives
NEW MESSAGE 1. Create a new hierarchy based on the Start of
Year field, and name it “Date Hierarchy”
From: Dana Modelle (Analyst)
Subject: Adding a date hierarchy 2. Right-click or drag to add fields until your
hierarchy contains the following (in this order):
Good morning!
• Start of Year
Hoping you can help with a quick request.
• Start of Month
Since we’ll be doing a lot of time-series analysis, Ethan asked us
to add a date hierarchy to the model so that users can quickly
• Start of Week
view trends at any level of granularity (year, month, day, etc.)

Please get that added before our afternoon call. Thanks! • Date
-Dana 3. Add your new hierarchy to the matrix visual (on
rows) and practice drilling up and down
between each level of granularity
SOLUTION: HIERARCHIES

Solution Preview
NEW MESSAGE

From: Dana Modelle (Analyst)


Subject: Adding a date hierarchy

Good morning!

Hoping you can help with a quick request.

Since we’ll be doing a lot of time-series analysis, Ethan asked us


to add a date hierarchy to the model so that users can quickly
view trends at any level of granularity (year, month, day, etc.)

Please get that added before our afternoon call. Thanks!

-Dana
DATA MODEL BEST PRACTICES

Focus on building a normalized model from the start


• Leverage relationships and make sure that each table serves a clear, distinct purpose

Organize dimension tables above data tables in your model


• This serves as a visual reminder that filters always flow “downstream”

Avoid complex relationships unless absolutely necessary


• Aim to use 1-to-many table relationships and one-way filters whenever possible

Hide fields from report view to prevent invalid filter context


• This forces report users to filter using primary keys from dimension tables
CALCULATED FIELDS WITH DAX
CALCULATED FIELDS WITH DAX

In this section we’ll use Data Analysis Expressions (DAX) to add calculated columns &
measures to our model, and introduce topics like row & filter context, iterators and more

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:

• Introduce DAX fundamentals and learn when to use calculated


DAX 101 Columns & Measures columns and measures

• Understand the difference between row context and filter


Row & Filter Context DAX Syntax context, and how they impact DAX calculations

• Learn DAX formula syntax, basic operators and common


Common Functions Calculate function categories (math, logical, text, date/time, filter, etc.)

• Explore nested functions, and more complex topics like


Iterators Time Intelligence iterators and time intelligence patterns
MEET DAX

Data Analysis Expressions (commonly known as DAX) is the formula language that drives
the Power BI front-end. With DAX, you can:
• Go beyond the capabilities of traditional spreadsheet formulas, with powerful and flexible functions built
specifically to work with relational data models
• Add calculated columns (for filtering) and measures (for aggregation) to enhance data models

Two ways to use DAX

Calculated Columns Measures


M VS. DAX

M and DAX are two distinct functional languages used within Power BI Desktop:
• M is used in the Power Query editor, and is designed specifically for extracting, transforming and loading data
• DAX is used in the Power BI front-end, and is designed specifically for analyzing relational data models

M DAX
Query Editor: Report View:
CALCULATED COLUMNS

Calculated columns allow you to add new, formula-based columns to tables in a model

• Calculated columns refer to entire tables or columns (no


A1-style cell references) HEY THIS IS IMPORTANT!
As a rule of thumb, use calculated
• Calculated columns generate values for each row, which columns to “stamp” static, fixed
values to each row in a table (or go
are visible within tables in the Data view upstream and use the Query Editor!)

• Calculated columns understand row context; they’re great DO NOT use calculated columns for
aggregation – this is what measures
for defining properties based on information in each row, are for!
but generally useless for aggregation (sum, count, etc.)

PRO TIP:
Calculated columns are typically used for filtering & grouping data, rather than creating aggregate numerical values
EXAMPLE: CALCULATED COLUMNS

In this case we’ve added a calculated column named


Parent, which equals “Yes” if the [Total Children] field is
greater than 0, and “No” otherwise
• Since calculated columns understand row context, a new
value is calculated in each row based on the value in the
[Total Children] column
• This is a valid use of calculated columns; it creates a
new row “property” that we can use to filter or segment
any related data within the model

Here we’re using an aggregation function (SUM) to


calculate a new column named TotalQuantity
• Since this is an aggregation function, the same
grand total is returned in every row of the table
• This is not a valid use of calculated columns;
these values are statically “stamped” onto the
table and can’t be filtered, sliced, etc.
DAX MEASURES

Measures are DAX formulas used to generate new calculated values

• Like calculated columns, measures reference entire tables or


columns (no A1-style cell references)
HEY THIS IS IMPORTANT!
• Unlike calculated columns, measures aren’t visible within As a rule of thumb, use measures
tables; they can only be “seen” within a visualization like a chart when a single row can’t give you
the answer, or when you need to
or matrix (similar to a calculated field in a PivotTable)
aggregate values across multiple
rows in a table
• Measures evaluate based on filter context, which means they
recalculate when the fields or filters around them change

PRO TIP:
Use measures to create numerical, calculated values that can be analyzed in the “values” field of a report visual
IMPLICIT VS. EXPLICIT MEASURES

Implicit measures are created when you drag raw numerical fields
into a report visual and manually select an aggregation mode (Sum,
Average, Min, Max, Count, etc.)

Explicit measures are created when you actually write a DAX formula
and define a new measure that can be used within the model

HEY THIS IS IMPORTANT!


Implicit measures are only accessible within the specific visualization
in which they were created, and cannot be referenced elsewhere
Explicit measures can be used anywhere in the report, and referenced
by other DAX calculations to create “measure trees”

Example of an implicit measure


QUICK MEASURES
Quick measures automatically create formulas based on pre-built templates or natural language prompts

Quick measure calculations can be used to build


measures using predefined templates (weighted
averages, percent difference, time intelligence, etc.)

Quick measure suggestions can be used to find


suggested measures based on natural language queries
(i.e. “sum of quantity sold by calendar year”)

PRO TIP:
Quick measures can be a great learning tool for beginners or for building more complex formulas but use
them with caution; mastering DAX requires a deep understanding of the underlying theory!
RECAP: CALCULATED COLUMNS VS. MEASURES

CALCULATED COLUMNS MEASURES

• Values are calculated based on information from each • Values are calculated based on information from any
row of a table (row context) filters in the report (filter context)
• Appends static values to each row in a table and • Does not create new data in the tables themselves
stores them in the model (which increases file size) (doesn’t increase file size)

• Recalculate on data source refresh or when changes • Recalculate in response to any change to filters within
are made to component columns the report
• Primarily used for filtering data in reports • Primarily used for aggregating values in report visuals

Calculated columns “live” in tables Measures “live” in visuals


PRO TIP: MEASURE TABLES
It’s a common best practice to create a dedicated table to store your measures; this will help you stay
organized, find measures quickly, and allow you to group related measures into folders

Option 1: Enter Data into Power Query (loads the table to the data model – table is visible in Power Query)

Add a table Name and click OK to


load the table to the data model
*from the Report view

Option 2: Create a calculated table using DAX directly in the model (table is not visible in Power Query)

Create new table & use a table


constructor { } to add a single column

*from the Data view


FILTER CONTEXT
Measures are evaluated based on filter context, which means that they recalculate
whenever the fields or filters around them change

For this value in the matrix (2,846), the Orders measure is calculated based on the
following filter context: Products[Product Name] = “Mountain Tire Tube”
• This allows the measure to return the total order quantity for each product specifically (or whatever
context the row and column labels dictate – years, countries, categories, customer names, etc.)

This total (15,587) does NOT calculate by summing the values above; it evaluates as
an independent measure with no filter context applied
• IMPORTANT: Every measure value in a report evaluates independently (like an island)
and calculates based on its own filter context

PRO TIP: Clicking the filter icon will show you the
filters currently applied to a selected visual
EXAMPLE: FILTER CONTEXT
MEASURE: Revenue Per Customer MEASURE: Total Customers
FILTER CONTEXT: FILTER CONTEXT:
• Calendar[Year] = 2021 or 2022 • Calendar[Date] = September 26, 2021

This is a page-level filter, which


impacts ALL visuals on this report
page (more on this later!)

COLUMN: Customer Full Name


FILTER CONTEXT:
• Calendar[Year] = 2021 or
2022
• Customer[Full Name] = Top 1
by Total Revenue

MEASURE: Total Orders MEASURE: Total Revenue MEASURE: Total Revenue


FILTER CONTEXT: FILTER CONTEXT: FILTER CONTEXT:
• Calendar[Year] = 2021 or 2022 • Calendar[Year] = 2021 or 2022 • Calendar[Year] = 2021 or 2022
• Customers[Occupation] = Skilled Manual • Customer[Full Name] = Top 100 by Total Orders • Customer[Full Name] = Mr. Maurice Shan
STEP-BY-STEP MEASURE CALCULATION

How exactly is this measure value calculated?


• NOTE: This all happens instantly behind the scenes, every time the filter context changes

STEP 1 STEP 2 STEP 3


Filter context is detected & applied Filters flow “downstream” to related tables Measure evaluates against the
filtered table

Product Lookup Table

Black

’Product Lookup’[Product Color] = “Black”

Product Lookup Table 1 1 Sum of values in the Order Quantity


Sales Data column of the Sales Data table, filtered to
Black *
* Black rows where the product color is “Black”
Returns Data

Black = 10,590
DAX SYNTAX
MEASURE NAME
Referenced Referenced
• Measures are always surrounded by
brackets (i.e. [Total Quantity]) when TABLE NAME COLUMN NAME
referenced in formulas, so spaces are OK

Total Quantity: = SUM(Transactions[quantity])


This is a “fully qualified” column, since it’s preceded by the table name.
FUNCTION NAME NOTE: Table names with spaces must be surrounded by single quotes:
• Calculated columns don’t always use functions, but • Without a space: Transactions[quantity]
measures do: • With a space: ‘Transactions Table’[quantity]
• In a Calculated Column, =Transactions[quantity]
returns the value from the quantity column in
each row (since it evaluates one row at a time)
PRO TIP:
• In a Measure, =Transactions[quantity] will Column references use fully qualified names (i.e. ’Table’[Column])
return an error since Power BI doesn’t know how Measure references just use the measure name (i.e. [Measure]) and
to translate that as a single value – you need can be called by typing an open square bracket “ [ “
some sort of aggregation
DAX OPERATORS
Arithmetic Comparison
Meaning Example Meaning Example
Operator Operator

+ Addition 2+7 = Equal to [City]=“Boston”

- Subtraction 5–3 > Greater than [Quantity]>10

* Multiplication 2*6 < Less than [Quantity]<10

/ Division 4/2 >= Greater than or equal to [Unit Price]>=2.5

^ Exponent 2^5 <= Less than or equal to [Unit Price]<=2.5

<> Not equal to [Country]<>”Mexico”


Pay attention to these!

Text/Logical Operator Meaning Example

& Concatenates two values to produce one text string [City] & “ “ & [State]

&& Create an AND condition between two logical expressions ([State]=“MA”) && ([Quantity]>10)

|| (double pipe) Create an OR condition between two logical expressions ([State]=“MA”) || ([State]=“CT”)

IN Creates a logical OR condition based on a given list (using curly brackets) ‘Store Lookup’[State] IN { “MA”, “CT”, “NY” }

*Head to https://learn.microsoft.com for more information about DAX syntax, operators, troubleshooting, etc.
COMMON FUNCTION CATEGORIES
MATH & STATS LOGICAL TEXT FILTER TABLE DATE & TIME RELATIONSHIP
Functions Functions Functions Functions Functions Functions Functions

Functions used for Functions that use Functions used to Functions used to Functions that create or Functions used to Functions used to
aggregation or conditional expressions manipulate text strings manipulate table and manipulate tables and manipulate date & time manage & modify
iterative, row-level (IF/THEN statements) or value formats filter contexts output tables vs. scalar values or handle time table relationships
calculations values intelligence calculations

Common Examples: Common Examples: Common Examples: Common Examples: Common Examples: Common Examples: Common Examples:
• SUM • IF • CONCATENATE • CALCULATE • SUMMARIZE • DATE • RELATED
• AVERAGE • IFERROR • COMBINEVALUES • FILTER • ADDCOLUMNS • DATEDIFF • RELATEDTABLE
• MAX/MIN • AND • FORMAT • ALL • GENERATESERIES • YEARFRAC • CROSSFILTER
• DIVIDE • OR • LEFT/MID/RIGHT • ALLEXCEPT • DISTINCT • YEAR/MONTH • USERELATIONSHIP
• COUNT/COUNTA • NOT • UPPER/LOWER • ALLSELECTED • VALUES • DAY/HOUR
• COUNTROWS • SWITCH • LEN • KEEPFILTERS • UNION • TODAY/NOW
• DISTINCTCOUNT • TRUE • SEARCH/FIND • REMOVEFILTERS • INTERSECT • WEEKDAY
• FALSE • REPLACE • SELECTEDVALUE • TOPN • WEEKNUM
Iterator Functions: • SUBSTITUTE • NETWORKDAYS
• TRIM
• SUMX
Time Intelligence:
• AVERAGEX
• MAXX/MINX • DATESYTD
• RANKX • DATESMTD
• COUNTX • DATEADD
• DATESBETWEEN

*Note: This is NOT a comprehensive list. DAX contains more than 250 different functions!
BASIC MATH & STATS FUNCTIONS

SUM Evaluates the sum of a column =SUM(ColumnName)

Returns the average (arithmetic mean)


AVERAGE of all the numbers in a column
=AVERAGE(ColumnName)

Returns the largest value in a column or


MAX between two scalar expressions
=MAX(ColumnNameOrScalar1, [Scalar2])

Returns the smallest value in a column


MIN or between two scalar expressions =MIN(ColumnNameOrScalar1, [Scalar2])

Performs division and returns the


DIVIDE alternate result (or blank) if DIV/0
=DIVIDE(Numerator, Denominator, [AlternateResult])
COUNTING FUNCTIONS

Counts the number of non-empty cells in a column


COUNT (excluding Boolean values)
=COUNT(ColumnName)

Counts the number of non-empty cells in a column


COUNTA (including Boolean values)
=COUNTA(ColumnName)

DISTINCTCOUNT Counts the number of distinct values in a column =DISTINCTCOUNT(ColumnName)

Counts the number of rows in the specified table,


COUNTROWS or a table defined by an expression
=COUNTROWS([Table])
ASSIGNMENT: MATH & STATS

Key Objectives
NEW MESSAGE 1. Create a measure named Total Customers, to
calculate the number of distinct
From: Dianne A. Xu (Senior Analyst)
AdventureWorks customers who made a
Subject: Help with a few measures transaction

Hey there, excited to start working with you!


2. Create a measure named Return Rate, defined
as quantity returned divided by quantity sold
I’ll need to pull some high-level metrics from our model to share
with leadership, and I could use some help with the calculations.

For now, could you please create one measure to calculate the
total number of distinct customers, and a second measure that
we can use to calculate return rate (quantity returned / quantity
sold)? Thank you!

-Dianne
SOLUTION: MATH & STATS

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Help with a few measures

Hey there, excited to start working with you!

I’ll need to pull some high-level metrics from our model to share
with leadership, and I could use some help with the calculations.

For now, could you please create one measure to calculate the
total number of distinct customers, and a second measure that
we can use to calculate return rate (quantity returned / quantity
sold)? Thank you!

-Dianne
BASIC LOGICAL FUNCTIONS

Checks if a given condition is met and returns


IF one value if the condition is TRUE, and another =IF(LogicalTest, ResultIfTrue, [ResultIfFalse])
if the condition is FALSE

Evaluates an expression and returns a specified


IFERROR value if it returns an error, otherwise returns =IFERROR(Value, ValueIfError)
the expression itself

Evaluates an expression against a list of values


SWITCH and returns one of multiple possible =SWITCH(Expression, Value1, Result1, …, [Else])
expressions

Checks whether both arguments are TRUE to


AND return TRUE, otherwise returns FALSE =AND(Logical1, Logical2) Note: Use the && and ||
operators to include more
than two conditions

Checks whether any argument is TRUE to


OR return TRUE, otherwise returns FALSE
=OR(Logical1, Logical2)
SWITCH

SWITCH Evaluates an expression against a list of values and returns one of multiple possible expressions

=SWITCH(Expression, Value1, Result1, …, [Else])

Any DAX expression that returns a single List of values produced by the Value returned if the
scalar value, evaluated multiples times expression, each paired with a result expression doesn’t match
to return for rows/cases that match any value argument
Examples:
• Calendar[Month ID] Examples:
• ‘Product Lookup’[category] =SWITCH( Calendar[Month ID],
1, “January”,
2, “February”

PRO TIP
SWITCH(TRUE) is a common DAX pattern to replace multiple nested IF statements
ASSIGNMENT: LOGICAL FUNCTIONS

Key Objectives
NEW MESSAGE 1. Create a calculated column in the Customer
Lookup table named Customer Priority:
From: Dianne A. Xu (Senior Analyst)
Subject: Customer segmentation fields • If the customer is a parent and has an annual
income > $100,000, Customer Priority = Priority
Hey there! • Otherwise, Customer Priority = Standard
Ethan has been working with the DS team on a customer 2. Create a calculated column in the Customer
segmentation analysis, and came back to us with a few requests.
Lookup table named Income Level:
Could you please add some new columns in our customer table
• If annual income is >= $150,000, Very High
to identify “priority” customers, segment customers based on
income level, and group some of the education categories? • If annual income is >= $100,000, High
I’ve attached the logic to use, but reach out with any questions! • If annual income is >= $50,000, Average
-Dianne
• Otherwise, Income Level = Low
ASSIGNMENT: LOGICAL FUNCTIONS

Key Objectives
NEW MESSAGE BONUS: Use a SWITCH function* to create another
column named Education Category:
From: Dianne A. Xu (Senior Analyst)
Subject: Customer segmentation fields • If EducationLevel is High School or Partial High
School, Education Category = High School
Hey there! • If EducationLevel is Bachelors or Partial College,
Ethan has been working with the DS team on a customer Education Category = Undergrad
segmentation analysis, and came back to us with a few requests.
• If EducationLevel is Graduate Degree, Education
Could you please add some new columns in our customer table Category = Graduate
to identify “priority” customers, segment customers based on
income level, and group some of the education categories?

I’ve attached the logic to use, but reach out with any questions!

-Dianne

*You can use the “data groups” tool to do this too!


SOLUTION: LOGICAL FUNCTIONS

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Customer segmentation fields

Hey there!

Ethan has been working with the DS team on a customer


segmentation analysis, and came back to us with a few requests.

Could you please add some new columns in our customer table
to identify “priority” customers, segment customers based on
income level, and group some of the education categories?

I’ve attached the logic to use, but reach out with any questions!

-Dianne
TEXT FUNCTIONS
Note: Use the & operator as a shortcut,
LEN Returns the number of characters in a string =LEN(Text) or to combine more than two strings

CONCATENATE Joins two text strings into one =CONCATENATE(Text1, Text2)

UPPER/LOWER Converts a string to upper or lower case =UPPER/LOWER (Text)

Returns a number of characters from the =LEFT/RIGHT(Text, [NumChars])


LEFT/RIGHT/MID start/middle/end of a text string =MID(Text, StartPosition, NumChars)

Replaces an instance of existing text with =SUBSTITUTE(Text, OldText, NewText,


SUBSTITUTE new text in a string [InstanceNumber])

Returns the position where a specified string =SEARCH(FindText, WithinText,


SEARCH or character is found, reading left to right [StartPosition], [NotFoundValue])
ASSIGNMENT: TEXT

Key Objectives
NEW MESSAGE 1. Update the Month Short column in the
Calendar Lookup table to extract and capitalize
From: Dianne A. Xu (Senior Analyst) the first 3 characters of the month name
Subject: Couple random requests
2. Create a new column in the Product Lookup
Good morning! table named SKU Category, to return any
number of characters before the first hyphen in
Hoping you can help with a couple quick updates to the model:
the ProductSKU column
1) Ethan wants to make the month abbreviations ALL CAPS to
make them more readable in our reports.
2) The product team asked us to break out the SKU category
into its own field, which we can define as any characters
before the first hyphen (“-”) in the ProductSKU column.

Thanks, reach out with any questions!


SOLUTION: TEXT

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Couple random requests

Good morning!

Hoping you can help with a couple quick updates to the model:

1) Ethan wants to make the month abbreviations ALL CAPS to


make them more readable in our reports.
2) The product team asked us to break out the SKU category
into its own field, which we can define as any characters
before the first hyphen (“-”) in the ProductSKU column.

Thanks, reach out with any questions!


BASIC DATE & TIME FUNCTIONS

TODAY/NOW Returns the current date or exact time =TODAY/NOW()

Returns the day of the month (1-31), month of


DAY/MONTH/YEAR the year (1-12), or year of a given date =DAY/MONTH/YEAR(Date)

HOUR/MINUTE/ Returns the hour (0-23), minute (0-59), or


second (0-59) of a given datetime value =HOUR/MINUTE/SECOND(Datetime)
SECOND

WEEKDAY/ Returns a weekday number from 1 (Sunday) to


7 (Saturday), or the week # of the year =WEEKDAY/WEEKNUM(Date, [ReturnType])
WEEKNUM

Returns the date of the last day of the month,


EOMONTH +/- a specified number of months =EOMONTH(StartDate, Months)

Returns the difference between two dates,


DATEDIFF based on a given interval (day, hour, year, etc.)
=DATEDIFF(Date1, Date2, Interval)
ASSIGNMENT: DATE & TIME

Key Objectives
NEW MESSAGE 1. Create a new column in the Customer Lookup
table named Birth Year, to extract only the year
From: Dianne A. Xu (Senior Analyst) from the BirthDate column
Subject: Customer birth years

Hey there, super easy one for you.

The customer segmentation project got me wondering if there


are any interesting patterns or insights based on customer age.

Could you please add a field in our customer table to extract only
the year from the birthdate field?

Thanks!
-Dianne
SOLUTION: DATE & TIME

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Customer birth years

Hey there, super easy one for you.

The customer segmentation project got me wondering if there


are any interesting patterns or insights based on customer age.

Could you please add a field in our customer table to extract only
the year from the birthdate field?

Thanks!
-Dianne
RELATED

RELATED() Returns related values in each row of a table based on relationships with other tables

=RELATED(ColumnName) HEY THIS IS IMPORTANT!


RELATED works like a VLOOKUP function in Excel – it uses the
The column from a related table containing relationship between tables (defined by primary and foreign keys)
the values you want to retrieve to pull values from one table into a new column of another.
Since this function requires row context, it can only be used as a
Examples:
calculated column or as part of an iterator function that cycles
• ‘Product Lookup’[Product Name] through all rows in a table (FILTER, SUMX, MAXX, etc.)
• ‘Territory Lookup’[Country]

PRO TIP:
Instead of using RELATED to create extra columns (which increases file size), nest it within measures like FILTER or SUMX
CALCULATE

CALCULATE() Evaluates an expression in a context that is modified by filters

=CALCULATE(Expression, [Filter1], [Filter2],…)

Name of an existing measure or a DAX formula A Boolean (True/False) expression or a table expression that defines a filter
for a valid measure Note: these require fixed values or aggregation functions that return a scalar
Examples: value (you cannot create filters based on measures)
• [Total Orders] Examples:
• SUM(‘Returns Data’[Return Quantity]) • ‘Territory Lookup’[Country] = “USA”
• Calendar[Year] <> MAX(Calendar[Year])

PRO TIP:
Think of CALCULATE as a filter modifier; it allows you to overrule existing report filters and “force” new filter context
EXAMPLE: CALCULATE

Here we’ve defined a new measure named Red Sales,


which evaluates the Quantity Sold measure under a
filter context where the product color is “Red”
HEY THIS IS IMPORTANT!
The CALCULATE function modifies and overrules
any competing filter context!
Note how we see the the same In this matrix, the “Black” row has competing filter
repeated values for each product context: Product Color = Black (from the row
color, and even the total! label) and Product Color= “Red” (from the
CALCULATE function)
Both can’t be true at the same time, so the “Red”
filter from CALCULATE takes priority
EXAMPLE: CALCULATE

CALCULATE If the measure being evaluated contains a CALCULATE function,


Filters are modified by CALCULATE filter context is overwritten between Step 1 & Step 2
[Product Color] = “Red”

STEP 1 STEP 2 STEP 3


Filter context is detected Filters flow “downstream” Measure evaluates against the
& applied Product Table
to related tables filtered table

Red
Product Table

Red

Sum of the Order Quantity column in the


1 1 Sales Data table, filtered to rows where
’Product Lookup’[Product Color] = “Black”
the product color is “Red”
Returns Data
Product Table *
*
Black
Sales Data Red = 4,011
Red
DAX MEASURE TOTALS
Measure totals may seem incorrect or inconsistent depending on how they are
calculated, because they don’t simply add up the visible values in the report

Total Returns look right, but [Total Orders] counts distinct orders in the Sales Data table
shouldn’t Total Orders be 37,888??
-Anonymous confused man

Order SO74144 included two


products: a bike and a helmet.
That counts as 1 distinct order for
the Total and 1 distinct order for
BOTH Accessories & Bikes

PRO TIP:
Understand EXACTLY how your With no filter context, there are
measures calculate and what they 25,164 total distinct orders
are designed to measure
ASSIGNMENT: CALCULATE

Key Objectives
NEW MESSAGE 1. Create a new measure named Bike Returns to
calculate the total quantity of bikes returned
From: Dianne A. Xu (Senior Analyst)
Subject: URGENT: Bike returns 2. Create a matrix to show Bike Returns (values)
by Start of Month (rows). What do you notice
Hey there, about the volume of bike returns over time?
Apparently George (our Product VP) has been speaking with 3. Create a new measure named Bike Sales to
some of the store managers, and they’ve raised concerns about calculate the total quantity of bikes sold, and
the number of bike returns they are seeing recently.
add it to the matrix. What do you notice?
Can you please create a measure to calculate total returns for
bikes specifically, and let me know what you see? Volume alone 4. Create a new measure named Bike Return
won’t tell the full story, so let’s calculate the return rate for bikes Rate using either CALCULATE or DIVIDE, and
as well, and see how it’s trending before responding to George. add it to the matrix
Need this ASAP – thank you!
5. How would you respond to the Product VP’s
concerns about rising bike returns?
SOLUTION: CALCULATE

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: URGENT: Bike returns

Hey there,

Apparently George (our Product VP) has been speaking with


some of the store managers, and they’ve raised concerns about
the number of bike returns they are seeing recently.
Can you please create a measure to calculate total returns for
bikes specifically, and let me know what you see? Volume alone
won’t tell the full story, so let’s calculate the return rate for bikes
as well, and see how it’s trending before responding to George.
(Solution continued on next slide)
Need this ASAP – thank you!
SOLUTION: CALCULATE

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: URGENT: Bike returns

Hey there,

Apparently George (our Product VP) has been speaking with


some of the store managers, and they’ve raised concerns about
the number of bike returns they are seeing recently.
Can you please create a measure to calculate total returns for
bikes specifically, and let me know what you see? Volume alone
won’t tell the full story, so let’s calculate the return rate for bikes The volume of bike returns has risen over time,
as well, and see how it’s trending before responding to George.
but so has the number of bikes being sold.
Need this ASAP – thank you!
When we look at the rate of returns as a percent
of sales, we don’t see a concerning trend.
ALL

ALL Returns all rows in a table, or all values in a column, ignoring any filters that have been applied

=ALL(Table or Column, [Column2], [Column3],…)


The table or column that you Additional columns that you want to clear filters on (optional)
want to clear filters on • Cannot specify columns if your first parameter is a table
Examples: • All columns must include the table name and come from the same table
• Transactions Examples:
• Products[Category]
• ‘Customer Lookup’[City], ‘Customer Lookup’[Country]
• Products[Product Name]

PRO TIP:
Instead of adding filter context, the ALL function removes it. This is often used in “% of Total” calculations, when the
denominator needs to remain fixed regardless of filter context.
ASSIGNMENT: CALCULATE & ALL

Key Objectives
NEW MESSAGE 1. Create a new measure named All Returns to
calculate the total number of returns,
From: Dianne A. Xu (Senior Analyst) regardless of filter context
Subject: Return analysis follow-up
2. Create a new measure named % of All Returns
Hey again, that divides Total Returns by All Returns
Thanks for the quick turnaround on that bike return analysis – 3. Create a matrix to show % of All Returns
crisis averted! (values) by product Category Name (rows).
That got me thinking about how we could start analyzing the Which category accounts for the largest
return data in our reports. Could you please help me create two percentage of returns? The smallest?
new measures, one to calculate ALL returns (regardless of filter
context), and another that divides Total Returns by All Returns?

That should allow us to see the % of returns by different


products and product categories.
SOLUTION: CALCULATE & ALL

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Return analysis follow-up

Hey again,

Thanks for the quick turnaround on that bike return analysis –


crisis averted!

That got me thinking about how we could start analyzing the


return data in our reports. Could you please help me create two
new measures, one to calculate ALL returns (regardless of filter
context), and another that divides Total Returns by All Returns?

That should allow us to see the % of returns by different


products and product categories.
FILTER

FILTER Returns a table that represents a subset of another table or expression

=FILTER(Table, FilterExpression) HEY THIS IS IMPORTANT!


FILTER is used to add new filter context,
A Boolean (True/False) filter expression to be and can handle more complex filter
Table to be filtered
evaluated for each row of the table expressions than CALCULATE (by
Examples: referencing measures, for example)
• Territory Lookup Examples:
• Customer Lookup • ‘Territory Lookup’[Country] = “USA” Since FILTER returns an entire table, it’s
• Calendar[Year] = 1998 often nested within other functions, like
• Products[Price] > [Overall Avg Price] CALCULATE or SUMX

PRO TIP:
Since FILTER iterates through each row in a table, it can be slow and computationally expensive; only use FILTER if a
simple CALCULATE function won’t get the job done!
ITERATOR FUNCTIONS
Iterator (or “X”) functions allow you to loop through the same expression on each row
of a table, then apply some sort of aggregation to the results (SUM, MAX, etc.)

=SUMX(Table, Expression)

Aggregation to apply to Table in which the Expression to be evaluated for


calculated rows* expression will be evaluated each row of the given table
Examples: Examples: Examples:
• SUMX • Sales • [Total Orders]
• COUNTX • FILTER(Sales, • Sales[Retail Price] * Sales[Quantity]
• AVERAGEX RELATED(Products[Category])=“Clothing”)
• RANKX
• MAXX/MINX

PRO TIP:
Imagine that iterator functions add a temporary new column to a table, calculate a value in each row based on the
given expression, then aggregate the values within that temporary column (similar to SUMPRODUCT in Excel)

*In this example we’re looking at SUMX, but other iterator functions follow a similar syntax
ASSIGNMENT: ITERATORS

Key Objectives
NEW MESSAGE 1. Create a new measure named Total Cost that
multiplies the order quantities in the Sales Data
From: Dianne A. Xu (Senior Analyst)
table by the product cost in the Product Lookup
Subject: Profit calculation – HELP! table, then calculates the sum

Hey,
2. Create a new measure named Total Profit
(revenue minus cost)
Ethan asked for a quick analysis of company profit over the past
few years, but I’m struggling with the calculation. 3. Create a matrix to show Total Profit (values) by
We need a measure that multiplies order quantity by product Year (rows). How much profit has
cost, but I’d like to do it without adding redundant columns to AdventureWorks earned so far in 2022?
our Sales table.
Could you take a stab at this please?

-Dianne
SOLUTION: ITERATORS

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Profit calculation – HELP!

Hey,

Ethan asked for a quick analysis of company profit over the past
few years, but I’m struggling with the calculation.

We need a measure that multiplies order quantity by product


cost, but I’d like to do it without adding redundant columns to
our Sales table.
Could you take a stab at this please?

-Dianne
TIME INTELLIGENCE
Time Intelligence patterns are used to calculate common date-based comparisons

Performance =CALCULATE(Measure, DATESYTD(Calendar[Date]))


To-Date Use DATESYTD for Years, DATESQTD for Quarters, DATESMTD for Months

Previous =CALCULATE(Measure, DATEADD(Calendar[Date], -1, MONTH))


Period
Select an interval (DAY, MONTH, QUARTER, or YEAR) and the
# of intervals to compare (e.g. previous month, rolling 10-day)

Running =CALCULATE(Measure,
Total DATESINPERIOD(Calendar[Date], MAX(Calendar[Date]), -10, DAY))

PRO TIP:
To calculate a moving average, use the running total calculation above and divide by the number of intervals
ASSIGNMENT: TIME INTELLIGENCE

Key Objectives
NEW MESSAGE Add the following measures to the model:

From: Dianne A. Xu (Senior Analyst) 1. Previous Month Returns


Subject: Time Intelligence Measures 2. Previous Month Orders

3. Previous Month Profit


Hey there, need a big favor!

The leadership team has been asking a lot of questions about 4. Order Target (10% increase over previous month)
month-over-month and year-over-year comparisons, and I’ve
5. Profit Target (10% increase over previous month)
been pulling the numbers pretty manually.
Could you please add the following list of measures, to make 6. 90-day Rolling Profit
these metrics easier to track and share with stakeholders?

Thank you!

-Dianne
SOLUTION: TIME INTELLIGENCE

Solution Preview
NEW MESSAGE

From: Dianne A. Xu (Senior Analyst)


Subject: Time Intelligence Measures

Hey there, need a big favor!

The leadership team has been asking a lot of questions about


month-over-month and year-over-year comparisons, and I’ve
been pulling the numbers pretty manually.
Could you please add the following list of measures, to make
these metrics easier to track and share with stakeholders?

Thank you!

-Dianne
DAX BEST PRACTICES

Know when to use calculated columns vs. measures


• Use calculated columns for filtering, and measures for aggregating values

Use explicit measures, even for simple calculations


• Explicit measures can be referenced anywhere, and nested within other measures

Use fully-qualified column references in measures


• This makes your DAX more readable, and differentiates column references from measure references

Move column calculations “upstream” when possible


• Adding calculated columns at the source or in Power Query improves report speed and efficiency

Minimize the use of “expensive” iterator functions


• Use iterators with caution, especially if you are working with large tables or complex models
VISUALIZING DATA
VISUALIZING DATA

In this section we’ll build dynamic interactive reports, introduce visualization best practices,
and explore features like bookmarks, drillthrough filters, parameters, tooltips, and more

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:


• Review frameworks and best practices for visualizing data and
Data Viz Best Practices Formatting & Filtering designing effective reports and dashboards

• Explore tools and techniques for inserting, formatting and


Bookmarks Report Interactions filtering visuals in the Power BI Report view

• Add interactivity using tools like bookmarks, slicer panels,


User Roles Parameters parameters, tooltips, and report navigation

• Learn how to configure row-level security with user roles


Custom Tooltips Mobile Layouts
• Optimize reports for mobile viewing using custom layouts
THREE KEY QUESTIONS

What TYPE OF DATA are you working with?


• Geospatial? Time-series? Hierarchical? Financial?

What do you want to COMMUNICATE?


• Comparison? Composition? Relationship? Distribution?

Who is the END USER and what do they need?


• Analyst? Manager? Executive? General public?
THREE KEY QUESTIONS

What TYPE OF DATA are you working with?

Time-series Financial

Geospatial Textual

Categorical Funnel

Hierarchical Survey

The type of data you’re working with often determines which type of visual will best represent it; for example,
using maps to represent geospatial data, line charts for time-series data, or tree maps for hierarchical data
THREE KEY QUESTIONS

What do you want to COMMUNICATE?

COMPARISON COMPOSITION DISTRIBUTION RELATIONSHIP

Used to compare values over Used to break down the Used to show the frequency Used to show correlation
time or across categories component parts of a whole of values within a series between multiple variables

Common visuals: Common visuals: Common visuals: Common visuals:


• Column/Bar Chart • Stacked Bar/Column Chart • Histogram • Scatter Plot
• Clustered Column/Bar • Pie/Donut Chart • Density Plot • Bubble Chart
• Data Table/Heat Map • Stacked Area (time series) • Box & Whisker • Data Table/Heat Map
• Radar Chart • Waterfall Chart (gains/losses) • Scatter Plot • Correlation Matrix
• Line Chart (time series) • Funnel Chart (stages) • Data Table/Heat Map
• Area Chart (time series) • Tree Map/sunburst (hierarchies) • Map/Choropleth (geospatial)

Keep it simple! While there are hundreds of charts to choose from, basic options like bars and columns, line
charts, histograms and scatterplots often tell the simplest and clearest story
THREE KEY QUESTIONS

Who is the END USER and what do they need?

THE ANALYST THE MANAGER THE EXECUTIVE


Likes to see details and Wants summarized data with Needs high-level, crystal clear
understand exactly what’s clear, actionable insights to KPIs to track business health
happening at a granular level help operate the business and topline performance
• Tables or combo charts • Common charts & graphs • KPI cards or simple charts
• Granular detail to support root- • Some detail, but only when it • Minimal detail, unless it adds
cause analysis supports a specific insight critical context to KPIs

How you visualize and present your data is a function of who will be consuming it; a fellow analyst may want
to see granular details, while managers and executives often prefer topline KPIs and clear, data-driven insights
ANALYTICS DASHBOARDS

Dashboards are analytics tools designed to consolidate data from multiple sources, track key metrics
at a glance, and facilitate data-driven storytelling and decision making

Product Data
Transactional Records

Gross Revenue Customer Data (CRM)

Centralized, user-facing dashboard


DASHBOARD DESIGN FRAMEWORK

1 Define the purpose A well-designed dashboard should serve a distinct


purpose for a distinct audience, use clear and
effective metrics and visuals, and provide a simple,
2 Choose the right metrics intuitive user experience.

Key questions to consider:


3 Present the data effectively
• Who are the end-users of your dashboard?
• What are their key business goals and objectives?
4 Eliminate clutter & noise
• What are the most important questions they need answers to?

• How can I present information as clearly as possible?


5 Use layout to focus attention

6 Tell a clear story


“ Perfection is achieved not when there is nothing more
to add, but when there is nothing left to take away
Antoine de Saint-Exupery

THE REPORT VIEW
Insert Menu (Add pages, visuals, buttons, shapes, images, etc.)

Report View
Panes
(Data, Format,
Bookmarks, Selection)

Report Canvas
Filter Pane
(Page-level, report-level,
visual-level filters)

Report Pages (each tab is a blank report canvas) View Options (Zoom, fit to page)
ASSIGNMENT: CARDS

Key Objectives
NEW MESSAGE
1. Insert a card in the Customer Detail report page
From: Victor Ignatius Zabel (BI Analyst) to show Total Customers, and rename the field
“UNIQUE CUSTOMERS”
Subject: Let’s get visual!
2. Add a background shape and match the
Hey there! formatting of the cards in the Exec Dashboard tab
We’ve kicked off the visualization work for our Power BI 3. Copy and paste to create a second card showing
dashboard, and I’m hoping you can help. Average Revenue per Customer, and rename the
field “REVENUE PER CUSTOMER”
For now I’d love for you to focus on building out the Customer
Detail report. Can you start by adding some KPIs to show total
customers and revenue per customer?

-Vic
SOLUTION: CARDS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Let’s get visual!

Hey there!

We’ve kicked off the visualization work for our Power BI


dashboard, and I’m hoping you can help.

For now I’d love for you to focus on building out the Customer
Detail report. Can you start by adding some KPIs to show total
customers and revenue per customer?

-Vic
BUILDING & FORMATTING CHARTS

The Build menu allows you to change the visual type, auto-
suggest visuals, and add data to customize chart components
(x-axis, y-axis, legend, tooltips, etc.)
• This is a contextual menu, so you will only see options which are
relevant to the selected visual

• You can build visuals by either inserting a specific chart type and
adding data, or by dragging a field from the Data pane onto the canvas
BUILDING & FORMATTING CHARTS

The Format menu allows you to quickly add common chart


elements (title, axis labels, data labels, legends, etc.) and
access additional options and properties in the Format pane
• This is a contextual menu, so you will only see options which
are relevant to the selected visual

Enable on-object formatting by double-clicking the chart


object (or right-click > format), which allows you to select and
edit individual chart elements
• On-object formatting is only available for certain visuals (bar,
column, line, area, combo & scatter)
ASSIGNMENT: LINE CHARTS

Key Objectives
NEW MESSAGE
1. Add a line chart to the Customer Detail report
From: Victor Ignatius Zabel (BI Analyst) showing Total Customers by week
Subject: Customer count by week 2. Add a trend line and a zoom slider to the x-axis

3. Enable tooltips, and format to match line chart in


Nice work on those cards!
the Exec Dashboard tab
Next up let’s add a weekly line chart to show how our customer
base is trending over time.

Please add a zoom bar to make it interactive, and format the


tooltips to match the line chart in the Exec Dashboard.

Thanks!
-Vic
SOLUTION: LINE CHARTS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Customer count by week

Nice work on those cards!

Next up let’s add a weekly line chart to show how our customer
base is trending over time.

Please add a zoom bar to make it interactive, and format the


tooltips to match the line chart in the Exec Dashboard.

Thanks!
-Vic
FILTERING OPTIONS

There are 3 types of filters accessible from the Filters pane*:


1. Visual-level filters apply to specific visuals

2. Page-level filters apply to all visuals on the report page

3. Report-level filters apply to all visuals across all report pages

*Drillthrough filters can be configured in the page formatting pane – more on that later!

Basic Options Top N Options Advanced (Values) Advanced (Text)

Filters can be configured using basic selections, logical operators, or Top N conditions
ASSIGNMENT: DONUT CHARTS

Key Objectives
NEW MESSAGE
1. Add a donut chart to the Customer Detail report
From: Victor Ignatius Zabel (BI Analyst) showing Total Orders by Income Level
Subject: Customer demographics 2. Add a chart title, turn off the legend, and update
the data labels to show the category and value
Good morning! (font size 8, 1 decimal place)
Just got a note from Ethan to see if we can build some 3. Update the colors of the slices to match the
demographic info into the customer report.
screenshot in the solution preview
Let’s add a couple donut charts to show the composition of
customers by income level and occupation. We’ll want to limit to 4. Add a visual-level filter to exclude customers with
just a few segments (maybe 3?) and do some formatting to a “Very High” income level
match the rest of the dashboard.
Thanks, you rock! 5. Copy the chart to show Total Orders by
Occupation, and add a visual-level filter to display
-Vic
the three occupations with the most orders (bonus
points if you use a Top N filter!)
SOLUTION: DONUT CHARTS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Customer demographics

Good morning!
Just got a note from Ethan to see if we can build some
demographic info into the customer report.
Let’s add a couple donut charts to show the composition of
customers by income level and occupation. We’ll want to limit to
just a few segments (maybe 3?) and do some formatting to
match the rest of the dashboard.
Thanks, you rock!
-Vic
CONDITIONAL FORMATTING

Conditional formatting allows you to dynamically


format Table or Matrix visuals based on cell values
• Conditionally formatting options can be found in the
Format pane, under Cell elements

• Options include background color, font color, data


bars, icons, or Web URL
ASSIGNMENT: TABLES

Key Objectives
NEW MESSAGE
1. Add a table to the Customer Detail report to
From: Victor Ignatius Zabel (BI Analyst) show Customer Key, Full Name, Total Orders (as
“Orders”) and Total Revenue (as “Revenue”)
Subject: Top customer table
2. Use conditional formatting to add light gray data
Hey there, this customer report is really coming together! bars to the orders column and a white > blue
color scale to the revenue column
Since the management team needs a way to identify high-value
customers, let’s add a table to our report showing customer 3. Add a visual-level filter (Top N) to show the 100
keys, full names, orders, and revenue. customers with the most orders, and add a chart
Probably makes sense to add some conditional formatting and title (“Top 100 Customers”)
limit to the top 100 customers for now.
4. Sort the table descending by orders
Thanks!

-Vic
SOLUTION: TABLES

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Top customer table

Hey there, this customer report is really coming together!

Since the management team needs a way to identify high-value


customers, let’s add a table to our report showing customer
keys, full names, orders, and revenue.
Probably makes sense to add some conditional formatting and
limit to the top 100 customers for now.

Thanks!

-Vic
ASSIGNMENT: TOP N TEXT CARDS

Key Objectives
NEW MESSAGE
1. Add a card to the Customer Detail report to show
From: Victor Ignatius Zabel (BI Analyst) Full Name
Subject: Top customers by revenue 2. Add a visual-level filter (Top N) to show the top
customer (Full Name) in terms of Total Revenue
Hey,
• What do you notice when you filter the
Ethan is loving the customer report so far – great job! report for low income customers?
He mentioned that he’d like to highlight top customers based on (Hint: check your value against the table)
revenue as well, so I’m thinking we could add some text cards to
• How could you modify the Top N filter to
show the top customer name, along with total revenue and the
number of orders placed. correct this?

We’ll be offering some coupons based on how much customers 2. Copy and paste the card (x2) to show Total
have spent in the past, so accuracy is critical here! Orders and Total Revenue for the top customer
-Vic 3. Add text boxes for titles and adjust formatting to
match the solution preview
SOLUTION: TOP N TEXT CARDS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Top customers by revenue

Hey,

Ethan is loving the customer report so far – great job!

He mentioned that he’d like to highlight top customers based on


revenue as well, so I’m thinking we could add some text cards to
show the top customer name, along with total revenue and the
number of orders placed.

We’ll be offering some coupons based on how much customers


have spent in the past, so accuracy is critical here!

-Vic
MAP VISUALS
Map Filled map

Power BI includes several types of map


visuals powered by Bing Maps
Tips for creating accurate maps:
1. Assign categories to geospatial fields
2. Add multiple location fields
Shape map Azure map 3. Use latitude/longitude when possible

HEY THIS IS IMPORTANT!


An administrator may need to enable
maps in your tenant settings in order
to use them in Power BI Service

*ArcGIS maps require a separate account, and are not pictured here
SLICERS

Slicers are visual filters which affect all other visuals on a report page (by default)
• Slicers can take many formats depending on the data type, including lists, dropdowns, tiles, ranges, and more

Categorical/Text options Date/Time options Numeric Range options

PRO TIP:
Use Apply/Clear All Slicers
buttons for more filtering control
ASSIGNMENT: SLICERS

Key Objectives
NEW MESSAGE
1. Add a slicer to filter the Customer Detail report
From: Victor Ignatius Zabel (BI Analyst) page by Year
Subject: Year slicer for customer report 2. Add a visual-level filter to exclude blanks

3. Choose any slicer style that allows users to filter


Hey there, quick request when you get a sec…
individual years or across multiple years
Could you please add a slicer to the customer report, so that
users can filter the entire page by year?

No preference for which specific type of slicer you use, as long as


managers can filter customers for a specific year or across
multiple years.

Thanks!

-Vic
SOLUTION: SLICERS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Year slicer for customer report

Hey there, quick request when you get a sec…

Could you please add a slicer to the customer report, so that


users can filter the entire page by year?

No preference for which specific type of slicer you use, as long as


managers can filter customers for a specific year or across
multiple years.

Thanks!

-Vic
DRILL UP & DRILL DOWN
Revenue by MONTH
Drill Up and Drill Down tools allow you to switch
between different levels of granularity
• In this example users can “drill up” from
weekly to monthly, or “drill down” to daily

• The single down arrow activates drill mode,


allowing users to drill by clicking data points
Revenue by WEEK
• The forked down arrow expands each level of
the hierarchy (used in matrix visuals)

PRO TIP:
Use location hierarchies and enable drill
Revenue by DAY mode to create interactive map visuals
ASSIGNMENT: DRILL DOWN

Key Objectives
NEW MESSAGE
1. In the Customer Detail report, update the X-axis
From: Victor Ignatius Zabel (BI Analyst) of the line chart to pull in Date Hierarchy
Subject: Dynamic time periods 2. Use the chart header to drill up and drill down to
explore trends at each level of granularity
Hey again, just got some feedback from the managers about our
customer report. 3. Test drill mode to change the granularity by
selecting individual data points in the chart
Chad loves the weekly trending chart, but Thad wants to see the
data by day and Vlad was hoping for an annual breakdown. • Why do some weeks look very low?
Instead of building multiple versions of the same line chart, could 4. Turn off drill mode and show the chart at a weekly
you please make it interactive so that Chad, Thad and Vlad get
level of granularity by default
the views they want?

Thanks!

-Vic
SOLUTION: DRILL DOWN

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Dynamic time periods

Hey again, just got some feedback from the managers about our
customer report.

Chad loves the weekly trending chart, but Thad wants to see the
data by day and Vlad was hoping for an annual breakdown.

Instead of building multiple versions of the same line chart, could


you please make it interactive so that Chad, Thad and Vlad get
the views they want?

Thanks!

-Vic
DRILL THROUGH FILTERS

Drill through filters allow users to navigate to a specific report page, pre-filtered on the item selected
• Here we’ve created a Product Detail page, set the type to Drillthrough, and configured drill through from Product Name
• This means that users can right-click any instance of product name (i.e. in a matrix visual) and use the Drill through option
to navigate straight to the Product Detail report filtered on that product (in this case “Mountain Tire Tube”)
REPORT INTERACTIONS

Edit report interactions to customize how filters applied to one visual impact other visuals on the page
• Cross-filter options include filter ( ), highlight ( ) and none ( ), depending on the visual type

Format > Edit Interactions

In this example, selecting a


product in the matrix visual:
• Filters the line chart & KPIs
• Highlights the bar chart
• Doesn’t impact the text cards

Most ordered type Most returned type


ASSIGNMENT: REPORT INTERACTIONS

Key Objectives
NEW MESSAGE
1. On the Customer Detail tab, edit the report
From: Victor Ignatius Zabel (BI Analyst) interactions based on the following logic:
Subject: Weird report interactions • When a filter is applied to the line chart, the
donut charts should filter (not highlight)
Hey there,
• When a filter is applied to the table, the line
I was playing with the customer report this morning and noticed chart and donuts should not filter
some odd visual interactions. For example, selecting a specific
customer shouldn’t filter the line chart, and probably shouldn’t • The slicer should filter all visuals on the
filter the donut charts either. report page
Could you please take a pass through the report interactions and
update any that seem off?

Thanks!

-Vic
SOLUTION: REPORT INTERACTIONS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: Weird report interactions

Hey there,

I was playing with the customer report this morning and noticed
some odd visual interactions. For example, selecting a specific
customer shouldn’t filter the line chart, and probably shouldn’t
filter the donut charts either.

Could you please take a pass through the report interactions and
update any that seem off?

Thanks!

-Vic
BOOKMARKS

Bookmarks capture the current state of a page, and allow


users to return to that state using report actions
• Bookmarks are commonly used for clearing filters,
highlighting specific insights, navigating reports, etc.

Bike sales in Europe (1H 2022)


ASSIGNMENT: BOOKMARKS

Key Objectives
NEW MESSAGE
1. Explore the Customer Detail report by adjusting
From: Victor Ignatius Zabel (BI Analyst) filters until you find an interesting insight or trend
(this can be anything you choose!)
Subject: Finding anything interesting?
2. Add a new bookmark to capture the current state
Hey, of the report, and name it “Customer Insight”
Now that you’re getting pretty familiar with our customer data, 3. Insert an Information button and add text to the
are you noticing any interesting insights or trends that might be
button style to summarize what you’ve found
worth explicitly calling out in the report?
This could be a great way for us to use bookmarks to draw 4. Assign a bookmark action to the button, and link
attention to some specific stories in the dashboard. While we’re to the Customer Insight bookmark you created
at it, let’s add another one to clear all filters from the page.
5. Create a second bookmark named “Clear all
Let me know what you think! Customer Filters” which returns the page to an
unfiltered state, and link it to a Reset button
-Vic
6. Test both bookmarks using CTRL-click
SOLUTION: BOOKMARKS

Solution Preview
NEW MESSAGE
Example: Among customers in Skilled Manual roles in
From: Victor Ignatius Zabel (BI Analyst) 2022, Ruben Suarez drove the most revenue at $4,683
Subject: Finding anything interesting?

Hey,

Now that you’re getting pretty familiar with our customer data,
are you noticing any interesting insights or trends that might be
worth explicitly calling out in the report?
This could be a great way for us to use bookmarks to draw
attention to some specific stories in the dashboard. While we’re
at it, let’s add another one to clear all filters from the page.

Let me know what you think!

-Vic
PARAMETERS

Parameters allow you to create variables which can be referenced in measures and controlled via slicers

Numeric range parameters


Typically used for scenario testing,
where users adjust numerical inputs to
see the impact on a given output

Fields parameters
Typically used to allow users to
dynamically change the metrics or
dimensions displayed in a report visual
EXAMPLE: NUMERIC RANGE PARAMETER

When you create a numeric parameter, Power BI generates two new measures:
one to define the parameter and another to capture the selected value:

Here we’ve created a parameter named Price Adjustment %, added it as a slicer,


and created measures to calculate Adjusted Profit based on the parameter value
EXAMPLE: FIELDS PARAMETER

When you create a fields parameter, Power BI adds a report slicer


and generates a new measure to capture the selected value:

Here we’ve created a parameter named Metric Selection and added


it to the Y-axis to let users dynamically change the metric shown
ASSIGNMENT: FIELDS PARAMETERS

Key Objectives
NEW MESSAGE
1. Add a new Fields parameter named “Customer
From: Victor Ignatius Zabel (BI Analyst) Metric Selection”, which includes Total Customers
and Average Revenue per Customer
Subject: More line chart updates
2. Add the parameter as a slicer to the Customer
Good news and bad news… Detail report, change the slicer style to Tile, turn
off the header, update to single select, and resize
The good news is that Chad, Thad and Vlad LOVE the drill options to create a horizontal layout
in the line chart – nice work!
3. Select the DAX measure automatically created,
The bad news is that now they can’t align on what’s the best
metric to show. Chad likes seeing total customers, but Vlad is
and update the text from “Average Revenue per
pushing for revenue per customer. Customer” to “Revenue per Customer”

What do you think we should do? 4. Update the line chart Y-Axis to use the Customer
Metric Selection parameter, remove the chart
-Vic
title, and update the line colors to match the
solution preview
SOLUTION: FIELDS PARAMETERS

Solution Preview
NEW MESSAGE

From: Victor Ignatius Zabel (BI Analyst)


Subject: More line chart updates

Good news and bad news…

The good news is that Chad, Thad and Vlad LOVE the drill options
in the line chart – nice work!

The bad news is that now they can’t align on what’s the best
metric to show. Chad likes seeing total customers, but Vlad is
pushing for revenue per customer.

What do you think we should do?

-Vic
PRO TIP: CUSTOM TOOLTIPS

Create custom tooltips by designing a new report page, setting the page type to Tooltip, and configuring
a visual to use the “Report page” tooltip type
Category Tooltip report page

PRO TIP:
Keep your published reports clean by hiding your tooltip pages
IMPORTING CUSTOM VISUALS

Power BI offers a library of custom visuals (via AppSource) from Microsoft-certified partners and
developers, which can be imported into the visualizations pane

HEY THIS IS IMPORTANT!


You need a Power BI account to browse or import
custom visuals from the AppSource marketplace
MANAGING & VIEWING ROLES

HEY THIS IS IMPORTANT!


Row-level security (RLS) rules are
defined in Power BI Desktop, but
actually applied in Power BI Service

Roles allow you to define row-level security rules, and


create filtered views to restrict access for specific audiences
• Here we’ve created views for territory managers (Europe,
N. America, Pacific), which filters records in the model
MOBILE LAYOUT

Mobile layout allows you to design mobile-specific versions of report pages by assembling visuals into new layouts
• NOTE: This is designed to optimize reports for viewing on the Power BI mobile app (after publishing to Power BI Service)
DATA VISUALIZATION BEST PRACTICES

Always ask yourself the three key questions


• What type of data are you visualizing, what are you communicating, and who is the end user?

Strive for clarity and simplicity above all else


• “Perfection is achieved not when there’s nothing more to add, but when there’s nothing left to take away”

Focus on creating clear narratives and intuitive user experiences


• Use bookmarks, drillthroughs, tooltips and navigation buttons to seamlessly guide users through reports

Create optimized layouts for mobile viewers


• Create custom mobile layouts if you plan to publish reports to Power BI Service or use the Power BI app
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE

In this section we’ll explore Power BI’s artificial intelligence features, including anomaly
detection, smart narratives, natural language Q&A, decomposition trees, and more

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:

• Explore AI-generated insights using smart narratives and


Anomaly Detection Smart Narrative anomaly detection

• Build and train Q&A visuals to allow users to explore Power BI


Q&A Visual Decomposition Tree models using natural language queries

• Learn how to use decomposition trees for data exploration


and root cause analysis
Key Influencers Top Segments
• Use key influencer visuals to identify the underlying factors
that drive specific outcomes for the business
ANOMALY DETECTION

Anomaly detection is used to automatically detect and explain anomalies in time series data
• The anomaly detection feature adds “flags” to existing line charts, which link to AI-generated explanations and summaries

Limitations:
• Only supported for line charts with a
time-series fields on the X-axis

• Does not support charts with legends,


multiple values, or a secondary axis

• Cannot be applied at the same time as


forecasts

• Not compatible with drill up/drill


down

• Requires at least four data points


SMART NARRATIVES

Smart narratives create customizable, AI-generated text summaries based on report pages or visuals
• Smart narratives react to report filters like any other visual, and can be updated with custom, dynamic values
Q&A VISUALS

Q&A visuals allow users to explore and visualize data using intuitive, natural language prompts
• Q&A visuals are only as useful as the data model behind them, and typically require significant “training” to be effective
Q&A TRAINING

Q&A visuals allow users to explore and visualize data using intuitive, natural language prompts
• Q&A visuals are only as useful as the data model behind them, and typically require significant “training” to be effective

Add human-readable Review actual prompts from


synonyms for tables, columns users to refine the model
or measures in the model (requires Power BI Service)

Ask example questions to find Pre-populate a list of


missing or misunderstood suggested questions that
terms and add new synonyms users can choose from
DECOMPOSITION TREES

Decomposition trees allow you to visualize how data is distributed across multiple dimensions
• Decomposition trees can be configured manually for data exploration, or leverage AI to support root cause analysis

EXPLAIN BY
One or more dimensions
to break down the data

ANALYZE
Measure or aggregate
you want to analyze
KEY INFLUENCERS

The key influencer visual helps you understand the factors that drive specific metrics or outcomes
• This can be used to analyze categorical or continuous outcomes, or identify top segments based on combinations of factors

Here we’re identifying factors that are


highly correlated with owning a home;
for example, parents are 1.59X more
likely to be homeowners, all else equal

We can also identify customer


segments where this outcome is likely;
for example, 93% of married customers
with children and a Bachelors degree
own a home (vs. 67.6% overall)
OPTIMIZATION TOOLS
PREVIEW: POWER BI OPTIMIZATION

In this section, we’ll investigate several native and external tools that can be used to
optimize and enhance your Power BI reports

TOPICS WE’LL COVER: GOALS FOR THIS SECTION:

• Explore the optimize ribbon tools, features, and use cases


Optimize Ribbon Pause Visuals
• Understand how and when pausing visuals can aid in report
development and creation
Optimization Presets Apply all Slicers
• Use Performance Analyzer to measure and compare the
impact of report elements on speed and performance
Performance Analyzer External Tools
• Explore external tools that can aid in report development,
learning, and optimization
OPTIMIZE RIBBON
The Optimize ribbon helps report authoring by allowing developers to pause data source
queries, apply preset settings, and view logs that measure report element performance

The Optimize tab includes pause, optimize, and other performance tools

Pause or refresh queries to make Show record logs that measure each
updates without processing changes elements performance within a report

Predefined optimization presents that can Apply and clear multiple slicer
be applied based on your reporting scenario selections on a report page at once
PAUSE VISUALS
Pause visuals stops queries from running and is used when you don’t want to immediately
apply additions or changes made to a report page or visual

When paused, the report:

• Holds all changes & updates and sets them to a


“visual has pending changes” state

• Shows a banner with refresh & resume visual queries

• Adds a refresh button to individual visuals allowing


you to only refresh that visual

• Allows you to add, move, and remove columns and


measures without having to wait for visuals to refresh

• Blocks formatting actions


OPTIMIZATION PRESETS
Optimization presets allow you to apply different predefined query optimization settings
like query reduction, interactive, and custom

Query Reduction
• Is best for DirectQuery connections because it follows
the best practices for DirectQuery optimization, turns
off cross-highlighting, cross-filtering, and adds an
Apply button to the filters pane

Interactivity
• Is the default setting and best used for Import mode
because it allows cross-highlighting, cross-filtering,
and real-time changes to slicers and filters
Customize
• Is best when you want to choose which query
reduction features to use
APPLY ALL SLICERS BUTTON
Adding an apply all slicers button to your report page tracks all slicer selections and can
be used to either apply or clear all slicers at once

Common scenarios & considerations:

• Apply multiple slicers on a report page at once

• Clear all slicers on a report page at once

• Apply & clear all slicer buttons impact all slicers on


the report page (you can’t pick and choose!)

• You can have as many of these buttons as you’d like

• Button can be added and formatted just like other


buttons in Power BI
PERFORMANCE ANALYZER
Performance Analyzer records user actions (like Excel’s macro recorder), and tracks the
load time (in milliseconds) for each step in the process

DAX Query
• Shows the amount of time it takes for the visual to send
the query to the engines, and for the engines to return
the result (Note: DAX Studio can only help optimize this)

Visual Display
• Shows the amount of time it takes for the visual to
populate, or “draw”, on the screen. Includes time to
retrieve web-based and geocoded images
Other
• Shows the amount of time required by the visual to
prepare the query, wait for other visuals to complete
their queries and perform other processing tasks
EXTERNAL TOOLS
External tools allows quick access to third-party built tools that are locally installed on
your computer and registered with Power BI Desktop

External tools generally fall into one of


the following categories:

Semantic Modeling Data Analysis Miscellaneous


These tools extend Power BI’s functionality Includes tools for connecting a PBI data model Some tools are used to make Power BI
for specific data modeling scenarios like DAX to a client application, in read-only mode, to more useful and accessible but don’t
optimization, ALM, and metadata translation query data and perform analysis tasks connect to the data model
• DAX Studio • Python • PBI.tips tutorials
• ALM Toolkit • Excel • DAX Guide
• Tabular Editor • Power BI Report Builder • PowerBI.tips
• Bravo

Featured open-source tools: https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-external-tools#featured-open-source-tools

You might also like