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

DA-100 EXAM PREP

ANALYZING DATA WITH POWER BI

With Microsoft Certified Power BI Expert Aaron Parry

*Copyright Maven Analytics, LLC


COURSE STRUCTURE

This is a project-based course, designed to help you build the exact


skills you need to pass the Microsoft DA-100 exam

Course resources include:


Downloadable PDF eBook to serve as a helpful reference when you’re
offline or on the go (or just need a refresher!)

Quizzes and Hands-On Demos to test and reinforce key concepts


throughout the course

Full-length Practice Test designed to replicate the actual DA-100 exam


experience, with detailed solution walkthroughs

*Copyright 2021, Maven Analytics, LLC


COURSE OUTLINE
Review the skills measured in the DA-100 exam and get
1 Preparing for the DA-100 Exam familiar with the test structure and environment

Install Power BI Desktop, set up a Power BI Service account,


2 Setting Up Desktop & Service and activate your Pro trial

3 Measured Skills Review Practice the core Power BI skills required for certification:

• Prepare the Data • Extract, profile, clean, transform, and load data from different sources

• Model the Data • Design a data model, create DAX measures, and optimize performance

• Visualize the Data • Create reports & dashboards to publish to Power BI Service

• Analyze the Data • Enhance reports to expose insights & perform advanced analysis

• Deploy & Maintain Deliverables • Create and manage datasets & workspaces

Simulate the real testing experience with a full-scale practice


4 Practice Exam exam and comprehensive solution walkthrough

*Copyright 2021, Maven Analytics, LLC


INTRODUCING THE COURSE PROJECT

THE Congratulations! You’ve just been hired as the lead Business Intelligence Analyst for
SITUATION Maven Cycles*, a boutique bicycle equipment shop

You’ve been asked to build an end-to-end business intelligence solution from the ground up,
THE using raw data containing information about sales, products, customers, and store locations.
BRIEF Your goal is to use the entire Microsoft Power BI ecosystem to design, build and deploy
reports and dashboards to share across the organization.

• Prepare the Data


• Model the Data
THE
OBJECTIVES • Visualize the Data
• Analyze the Data
• Deploy & Maintain Deliverables

*This data is provided by Microsoft and Maven Analytics 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. *Copyright 2021, Maven Analytics, LLC
THE MAVEN CYCLES DATA MODEL

Table Name Table Type Definition


Foreign keys are date, product, customer & territory keys. Table contains sales
Sales Fact
data including order number, quantity, and quantity type
Calendar Date Primary key is Date. Contains date, month, week, quarter and year details

Age Group Lookup Primary key is Age Group Key. Contains Age Group

Gender Lookup Primary key is Gender Key. Contains Customer Gender

Product Category Lookup Primary key is Product Category Key. Contains Product Category

Product Primary key is Product Subcategory Key. Contains Subcategory and product
Lookup
Subcategory category key
Primary key is Product Key. Contains subcategory key, product, cost, and unit
Products Lookup
price details
Primary key is Sales Territory Key. Contains region, country, continent, territory
Regions Lookup
manager, and manager email details

*Copyright 2021, Maven Analytics, LLC


SETTING EXPECTATIONS

This course is for users who already have a basic level of Power BI proficiency
• We’ll review fundamentals, but you should have a basic understanding of how to import data, create
a data model, use DAX formulas, build visuals, and distribute reports through Power BI Service

Our goal is to help you ace the Microsoft DA-100 exam


• This is not a deep dive into ALL of Power BI’s capabilities, but an effective and comprehensive guide to
the specific topics covered in the DA-100 exam

What you see on your screen may not always match mine
• Power BI features are updated frequently, so tools and interface options may look different or change
over time (I’ll be using a Chrome browser on a PC/Windows machine)

You’ll need a compatible email address to create a Power BI Service account


• NOTE: You must use a work or school email address to access Power BI Service, and some features are
only accessible with a PRO or Premium Per User license (60-day free trial)

*Copyright 2021, Maven Analytics, LLC


INTRO TO THE DA-100 EXAM

*Copyright 2021, Maven Analytics, LLC


EXAM STRUCTURE

Platform Pearson VUE (remote connection)

Question Format Knowledge-Based + Case Study

Number of Questions 40 - 60

Time Limit 150 minutes (2.5 hours)

Passing Score 70% (700/1000)

Expiration 2 Years

~$165 USD*
Cost *Price is based on the country in which the exam is proctored

*Copyright 2021, Maven Analytics, LLC


SKILLS MEASURED

Prepare the Data Model the Data Visualize the Data Analyze the Data Deploy & Maintain
Deliverables
• Get data from different sources • Design a Data Model • Create reports • Enhance reports to expose • Manage datasets
insights
• Profile the data • Develop a data model • Create dashboards • Create and manage workspaces
• Perform advanced analysis
• Clean, transform, and load data • Create measures using DAX • Enrich reports for usability

• Optimize Performance

*Copyright 2021, Maven Analytics, LLC


EXAM QUESTION TYPES

Knowledge-Based Questions Case Study Questions


Evaluate Power BI product knowledge related to Multiple choice questions which require you to
process, formulas, functions, modeling, analysis, etc. derive the correct answer based on a provided case

Question types include: Each case is divided into the following parts:
• Multiple choice & multi-response • Introduction & how to start
• Fill in the blank (select from drop down options) • Overview
• Drag and drop (from a list of options) • Existing environment
• Data available
• Data structure & format
• Data concerns
• Reporting requirements
HEY THIS IS IMPORTANT!
• Question
The exam doesn’t include any questions
where you use or interact with Power BI

*Copyright 2021, Maven Analytics, LLC


EXAMPLE: KNOWLEDGE-BASED QUESTION

From the Power Query editor, what data profiling tool (Data Preview) allows you to only see the percentage of
Multiple Choice
empty values in each column?
a. Monospaced
b. Column quality
c. Column distribution
d. Column profile

You are building a report from a SQL Server database and need to import database tables into Power BI
Drag & Drop Desktop. What are the first three actions you should take?

Actions Answer Area


Set Data Connectivity mode to Import Get data -> SQL Server

Get data -> SQL Server Enter Server & Database names

Verify credentials & connect Set Data Connectivity mode to Import

Select tables and press Load

Enter Server & Database names

*Copyright 2021, Maven Analytics, LLC


EXAMPLE: KNOWLEDGE-BASED QUESTION

Drop-down Selection How would you complete the following DAX calculated table expression, so it returns
a table of the top 25 customers based on Total Revenue?

Top 25 Customers = CALCULATETABLE(

TOPN(

DESC(

FILTER(

25, ‘CYCLE SALES’,

DESC(

FILTER(

[TOTAL REVENUE]

[Total Revenue], ASC(

TOPN(

DESC(

FILTER(

*Copyright 2021, Maven Analytics, LLC


EXAMPLE: CASE STUDY

You’ve just been hired as a Web Analytics Manager for Maven Toy Emporium, an ecommerce toy shop, to help
Overview build a faster and more efficient reporting process. Currently, it takes multiple analysts’ weeks to create
quarterly business reports. You’ve been asked to help build an end-to-end Power BI solution to help the
company streamline reporting and grow the business.

You have access to Maven Toy Emporium’s entire online data


Sales Data repository, which includes information about products, stores,
sales, customers, inventory, and projections →

*Copyright 2021, Maven Analytics, LLC


EXAMPLE: CASE STUDY

Concerns You have no concerns about the structure or quality of the data

Maven Analytics has identified the following technical requirements:


Reporting
Requirements • Leadership team wants to see sales by region
• Regional sales managers need to see sales and returns at different date granularities
• Regional sales managers must be able to see the data for their assigned region only
• Leadership and regional sales managers need to analyze sales performance against projections
• Sales is requesting reports showing the stock on hand

Question #1 What is the best way to distribute the reports to the Leadership team?
A. Share the reports with each team member
B. Add the leadership team as members to the Workspace
C. Create and publish the reports via an App
D. Publish the reports to Web

*Copyright 2021, Maven Analytics, LLC


EXAM RULES (REMOTE)

Power BI certification exams have specific rules which are actively enforced by proctors; any violation can
result in disqualification, so be mindful!

Photo ID Clear Desk


(GOVT issued)

Pass Tech Checks No phones, headphones, external monitors

Close all programs No Talking


(except proctor questions)

Browser Open Alone in room

*Copyright 2021, Maven Analytics, LLC


EXAM RULES (IN-PERSON)

Power BI certification exams have specific rules which are actively enforced by proctors; any violation can
result in disqualification, so be mindful!

Two Forms of ID Required Enhanced security protocol


(GOVT issued + 1 additional) (digital photo & digital signature)

No Personal Items No Hats or hooded shirts


(phones, bags, notes, watches, wallets, etc.)

No Talking Arrive 15 Minutes Early


(except proctor questions) (more than 15 min late not admitted)

*Copyright 2021, Maven Analytics, LLC


SCHEDULING THE EXAM

1 Head to the DA-100 site* and create an account 2 Select the exam language & details

In-person or remote Date & time

Payment

*Make sure account name matches your ID

3 Launch the exam on testing day!

PRO TIP: To avoid surprises, take 5 minutes to run a system test before your
remote exam day to make sure your computer and internet speed is sufficient

*https://docs.microsoft.com/en-us/learn/certifications/exams/da-100 *Copyright 2021, Maven Analytics, LLC


EXAM RESULTS

EXAM DETAILS
BASIC EXAM INFO Exam type, location, and
Exam details including registration information
name, id, result, and score

PERFORMANCE BY EXAM SECTION


Bar chart that represents your section-level performance
(Bar length cannot be used to calculate number of questions answered correctly)

PERFORMANCE COMPARISON
How your performance compares to others
who have taken the DA-100 exam

*Detailed score report is available from the Pearson Vue site *Copyright 2021, Maven Analytics, LLC
HELPFUL RESOURCES

MeasureUp offers the official Microsoft Power BI practice test, which includes
practice questions, detailed answers & references, study & certification testing
modes, and an instant score report
(mindhub.com/da-100-analyzing-data-with-microsoft-power-bi-microsoft-
official-practice-test/p/MU-DA-100)

Microsoft Learn offers on-demand or instructor- Power BI Documentation provides The Power BI YouTube Channel publishes
led learning paths tailored to the DA-100 detailed information for entire ecosystem demos, feature summaries, and advanced
(docs.Microsoft.com/learn) (powerbi.microsoft.com/blog) tutorials (check out “Guy in a Cube” too!)

*Copyright 2021, Maven Analytics, LLC


TIPS FOR SUCCESS

Learn by doing – use Power BI every day


• Nothing beats on-the-job experience and hands-on practice with Power BI, so use it often!

Use your resources, and study how you learn best


• Leverage resources available to you, including the official practice test & Microsoft Learn

Remember the rules of the exam (don’t fail on a technicality!)


• Be sure you follow all rules based on your exam setting (ID, no talking, clean environment, no phones)

Skip questions if you get stuck, and revisit them later


• When allowed, move on to familiar questions before returning to work through harder ones

*Copyright 2021, Maven Analytics, LLC


SETTING UP DESKTOP & SERVICE

*Copyright 2021, Maven Analytics, LLC


INSTALLING POWER BI DESKTOP

1 Head to powerbi.microsoft.com/desktop and click “Download free”

Use See download or language


options to update Power BI Desktop

2 Click on “Get” to download Power BI Desktop from the Microsoft Store

*Copyright 2021, Maven Analytics, LLC


CREATING A POWER BI SERVICE ACCOUNT

1 Head to powerbi.microsoft.com/landing/signin and click “TRY FREE” 2 Create & verify your account

3 Navigate directly to app.powerbi.com to log in

HEY THIS IS IMPORTANT!


Microsoft requires a work or school email address, so domains
like @gmail, @yahoo or @outlook will not be accepted

*Copyright 2021, Maven Analytics, LLC


ACTIVATING A PREMIUM PER USER TRIAL

1
Your trial period lasts for 60 days, and you’ll see your
remaining time in the header bar each time you log in

HEY THIS IS IMPORTANT!


3 You are activating a Premium per User (PPU) trial
All Pro features are included with a PPU trial, and
we’ll focus on additional features included with
PPU later in the course

Refer to Microsoft’s site for post-trial pricing: powerbi.microsoft.com *Copyright 2021, Maven Analytics, LLC
THE POWER BI SERVICE (APP) INTERFACE
SETTINGS MENU
OFFICE 365 APP LAUNCHER NAVIGATION PATH WORKSPACE OPTIONS Quick links for settings, help,
Email, OneDrive, Calendar, etc. Highlights the active workspace, Change view, update settings, feedback, downloads etc.
app, report or dashboard manage access & search

NAVIGATION PANE
Key Power BI views,
including Favorites,
Apps, Workspaces, etc.

GET DATA CONTENT CANVAS


Import, create or discover new Displays all your datasets, visuals,
data connections & content reports, dashboards, and workbooks

*Copyright 2021, Maven Analytics, LLC


WORKSPACES

There are two types of workspaces in Power BI Service: My Workspace & Workspaces

My Workspace Workspaces

• Personal workspace for a single user • Shared workspace for many users
(Free or paid license) (with paid licenses)
• Only you can access its content • Multiple users can access & collaborate
(can’t collaborate with others) on content
• Content can be shared with individual • Content can be created & shared across
Pro/PPU users (shared with me) your organization
• Contains core building blocks (datasets, • Contains core building blocks (datasets,
workbooks, reports, and dashboards) workbooks, reports, and dashboards)
plus dataflows

*Copyright 2021, Maven Analytics, LLC


CREATING A WORKSPACE

Add a Name (required) and optional


Description for your workspace

HEY THIS IS IMPORTANT!


We’ll use this workspace later in the
course when we publish a report to
Power BI Service

*Copyright 2021, Maven Analytics, LLC


MEASURED SKILLS REVIEW

*Copyright 2021, Maven Analytics, LLC


PREPARING THE DATA

Prepare the Data Model the Data Visualize the Data Analyze the Data Deploy & Maintain
Deliverables
• Get data from different sources • Design a Data Model • Create reports • Enhance reports to expose • Manage datasets
insights
• Profile the data • Develop a data model • Create dashboards • Create and manage workspaces
• Perform advanced analysis
• Clean, transform, and load data • Create measures using DAX • Enrich reports for usability

• Optimize Performance

*Copyright 2021, Maven Analytics, LLC


GETTING DATA FROM DIFFERENT SOURCES

In this section we’ll cover getting data from different sources, including changing data source
settings, selecting storage modes, identifying query issues, and using parameters

TOPICS WE’LL COVER: COMMON QUESTIONS:


• You need to provide users with a summary version of a sales
Connecting to Data Data Sources dataset, which of the following actions should you take and in
what order?

• You have a large SQL database table and only want to import a
Storage Modes Parameters sample. Which of the following techniques will help you import
a sample of data?

• What query editor tool can be used to dynamically change a


data source between different servers?

*Copyright 2021, Maven Analytics, LLC


CONNECTING TO DATA

Power BI can connect to virtually any type of data source, including (but not limited to):
• Flat files & Folders (csv, text, Excel, JSON etc.)
• Databases (SQL, Access, Oracle, IBM, MySQL, etc.)
Connecting to
Data • Power Platform (Dataflows, Power BI datasets, Dataverse, etc.)
• Azure (SQL Database, Blob Storage, Cosmos DB, Data Lake Storage, etc.)
Data Sources • Online Services (SharePoint, GitHub, Dynamics 365, Google Analytics, Salesforce, etc.)
• Others (Web feeds, R scripts, Spark, Hadoop, etc.)
Storage Modes

Parameters

*Copyright 2021, Maven Analytics, LLC


THE QUERY EDITOR (INTRODUCTION)

Once you connect to data, the Query Editor lets you shape & transform the data to meet
your needs, then load that model into Power BI Desktop
Connecting to
Data
QUERY EDITING TOOLS
Table transformations, calculated columns, etc.

Data Sources

Storage Modes FORMULA BAR


This is “M” code
TABLE NAME
& PROPERTIES

Parameters

QUERY PANE APPLIED STEPS


Like a macro!

COLUMN PROFILE
Based on first 1,000 rows

*Copyright 2021, Maven Analytics, LLC


DATA SOURCE: JSON FILE

To connect to a JSON file or transform a field within a flat file that contains JSON:

Connecting to
Data
1 Convert the JSON list to a table

Data Sources

Storage Modes
2 Expand the attributes in the list to columns

Parameters

3 Change the data type for each column

For more detail visit: https://docs.microsoft.com/en-us/power-query/connectors/json *Copyright 2021, Maven Analytics, LLC
DATA SOURCE: POWER BI DATA SOURCE FILES (PBIDS)

Power BI Data Source files (PBIDS) contain a single set of pre-wired data source
connection settings (no data)
Connecting to Key Benefits:
Data
✓ They make data sources easier to share with other users
Data Sources ✓ They are useful for new report designers who are not familiar with available data sources
✓ They speed up the “Get Data” process
Storage Modes ✓ They only support a single data source in one file
✓ They can be autogenerated within Power BI Desktop (preferred method) or directly from a text editor
Parameters

HEY THIS IS IMPORTANT!


Power BI Data Source files do not store user
authentication credentials like username and password

*Copyright 2021, Maven Analytics, LLC


DATA SOURCE: POWER BI DATA SOURCE FILES (PBIDS)

To create a PBIDS file: To connect to a PBIDS file:


1. Open “Data source settings” 1. Open the PBIDS file, enter credentials,
2. Select the data source to convert launch “Data Source Navigator” window
Connecting to
Data 3. Export & save as a PBIDS file

Data Sources

Storage Modes

Parameters

*Copyright 2021, Maven Analytics, LLC


DATA SOURCE: MICROSOFT DATAVERSE

The Microsoft Dataverse (Common Data Service) is a cloud-based storage option for
your organization’s data that you can connect to business applications
Connecting to Key Benefits:
Data
✓ Easy to manage – Both the metadata and data are stored in the cloud
Data Sources ✓ Easy to secure – Users can only see data if they are granted access
✓ Easy to access – Connect to Power BI, Power Apps, Power Automate, and Power Virtual Agents
Storage Modes

Parameters

HEY THIS IS IMPORTANT!


To connect to Microsoft Dataverse, you’ll need to know
the server address, which typically has the following
format: https://company.crm.dynamics.com. And maker
permissions to access the portal and read permissions
to access data within tables

For more detail visit: https://docs.microsoft.com/en-us/powerapps/maker/data-platform/data-platform-powerbi-connector *Copyright 2021, Maven Analytics, LLC
DATA SOURCE: SQL SERVER ANALYSIS SERVICES TABULAR (SSAS)

There are two methods to connect SSAS tabular models: Import & Live Connection

Import
Connecting to
Data ✓ Select model or perspective, and
then specific table or column
Data Sources ✓ Import data into memory
✓ Shape data with Query Editor
Storage Modes ✓ Create & enhance data model

Parameters
Live Connection

✓ Live connection to tabular model


HEY THIS IS IMPORTANT!
✓ Select model or perspective
If you plan to publish your tabular
model to Power BI Service and it’s ✓ Looking at most recent data
built from a Live connection, you
must have a data gateway installed

For more detail visit: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-analysis-services-tabular-data *Copyright 2021, Maven Analytics, LLC
DATA SOURCE: SHAREPOINT ONLINE

SharePoint Online lets companies organize, share, and access information via sites
Sites contain document libraries, a special type of folder, that store folders and files
Connecting to
Data

SharePoint Sites Document Libraries


Data Sources

Storage Modes

Parameters

*Copyright 2021, Maven Analytics, LLC


DATA SOURCE: SHAREPOINT ONLINE

You can get data from a SharePoint Online site by connecting to a SharePoint folder

Connecting to
Data
1 Enter the site root URL

Data Sources

Storage Modes
2 Combine & Transform the data 3 Filter folder path to correct document library
Parameters

*Copyright 2021, Maven Analytics, LLC


STORAGE MODES

Power BI lets you choose between these types of storage modes for your data sources:
• Import: Tables stored in-memory within Power BI and queries are fulfilled by cached data
Connecting to • DirectQuery: Tables connected directly to the source & queries executed on-demand at the source
Data • Dual: Tables come from in-memory data or by an on-demand query to the data source

Data Sources Imported Data DirectQuery


Use DirectQuery when: Performance -Best
-Depends on the data source. Generally,
slower compared to imported data

Storage Modes
✓ Dataset is too large to be Number of Data
Sources
-Unlimited -Unlimited

stored in-memory -Limited M transforms


Data
-No M transform restrictions -Transforms based on data source
Parameters ✓ Source data changes Transformations language
frequently & reports must -Very restricted
Data Modeling -No restrictions on data modeling -Limited DAX & no calculated tables
show the most recent data -Quick Insights not supported

✓ Company policy states data Data Model Size


-Loaded in-memory (increases model size)
-Pro: 1GB per dataset
-Large/frequent volume of data
-Does not increase model size
can only be accessed from -Premium: Capacity based -Limited by data source hardware

the original source Data Refresh


-Data only current to last refresh
-Pro: 8x per day 30-min intervals
-Near real-time
-Report always shows latest data
-Full refreshes are “expensive” available

Row-level -User-level role definitions only available


-User-level role definitions
Security for some data sources

*Copyright 2021, Maven Analytics, LLC


DATA SOURCE SETTINGS

The Data Source Settings allow you to manage data connections and permissions

Connecting to
Data

Data Sources

Storage Modes

Parameters

HEY THIS IS IMPORTANT!


Connections to local files reference the exact path
If the file name or location changes, you will need to
change the source and browse to the current version

*Copyright 2021, Maven Analytics, LLC


PRO TIP: DYNAMIC SOURCES WITH PARAMETERS

Parameters are a useful way to change data source values dynamically in Power Query

Connecting to
Data

Data Sources

Storage Modes

Parameter
Parameters
name

Parameter HEY THIS IS IMPORTANT!


data type These parameters are different from
the “What-If” parameters created in
the Power BI Desktop front-end
Parameter
value

*Copyright 2021, Maven Analytics, LLC


DATA PROFILING

In this section we’ll cover data profiling with the Query Editor, including identifying data
anomalies, examining data structures, and interrogating column properties and statistics

TOPICS WE’LL COVER: COMMON QUESTIONS:


• What data profiling tool shows row values as either valid,
View Menu Column Quality error, or empty?

• As part of data QA, you need to determine if the ‘state’ column


values are defined consistently, what should you do?
Column Distribution Column Profile
• From the query editor, you turn on column profile and column
distribution, which of the following are true?

*Copyright 2021, Maven Analytics, LLC


VIEW MENU

The VIEW tab includes data preview and other advanced editing tools

View Menu

Column Quality

Column
Distribution

Column Profile Turn off or on the Applied Steps Enable parameter creation Open the M code
menu and M code formula bar advanced editor
Data profiling tools like column
quality, distribution, and profile

*Copyright 2021, Maven Analytics, LLC


DATA PROFILING TOOLS (COLUMN QUALITY)

Data profiling tools like column quality, column distribution, and column profile provide a
visual way to explore data and get a sense of your dataset composition

View Menu

Column Quality
Hover over the column quality
box to reveal a contextual menu
Column
Distribution

Column Profile Use the options menu to clean


Column quality shows the percentage duplicates, errors & empty values
of values within a column that are
valid, have errors, or are empty

PRO TIP: Use the contextual menu to solve column quality issues instead of having to
right-click or find the right Power Query option

*Copyright 2021, Maven Analytics, LLC


DATA PROFILING TOOLS (COLUMN DISTRIBUTION)

Column distribution provides a sample


distribution of the data within the column

View Menu

Hover over the column quality


Column Quality
box to reveal a contextual menu

Column
Distribution

Column Profile
Use the options menu to clean
Suggested action based on duplicates, errors & empty values
column distribution results

PRO TIP: Use column distribution to identify primary keys within your lookup tables

*Copyright 2021, Maven Analytics, LLC


DATA PROFILING TOOLS (COLUMN PROFILE)

Column profile provides a more holistic view of data within a column


providing sample distribution of the data and column statistics

View Menu

Column Quality

Column
Distribution

Column Profile

Hover over value distribution bar


for suggested transformations
and more options

Column statistics provide a bit


more detail than distribution view
*Copyright 2021, Maven Analytics, LLC
CLEAN, TRANSFORM & LOAD DATA

In this section we’ll cover how to clean, transform, and load data into Power BI, including
identifying keys for joins, shaping tables, combining queries, and modifying M code

TOPICS WE’LL COVER: COMMON QUESTIONS:

• Based on the following M code, what will be the


Cleaning Data Identifying Keys output of the applied step?
• From the Query Editor, you want to remove a leading
Shaping Tables Combining Queries underscore from records in the ‘source’ column. How
would you write the M code?
• You import the dataset pictured below. How should
Modifying M Code you transform the dataset to support period-over-
period calculations?

*Copyright 2021, Maven Analytics, LLC


BASIC TABLE TRANSFORMATIONS

The HOME tab includes general settings and common table transformation tools

Cleaning Data

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

Shaping Tables

Combining
Queries
The ADD COLUMN tools create new columns (based on conditional rules, text operations, calculations, dates, etc.)
Modifying M Code

*Copyright 2021, Maven Analytics, LLC


BASIC TABLE TRANSFORMATIONS

Sort values (A-Z, Low-High, etc.) Change data type (date, $, %, text, etc.)

Promote
Cleaning Data header row

Identifying Keys

Shaping Tables Choose or remove columns


Duplicate, move &
Tip: use the “Remove Other rename columns
Combining Columns” option if you always
Queries want a specific set Tip: right-click the
Keep or remove rows column header to
access common tools
Modifying M Code Tip: use the “Remove Duplicates”
option to create a new lookup
table from scratch

*Copyright 2021, Maven Analytics, LLC


ADDING 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)
• They are often used to create unique IDs and form relationships between tables (more on that later!)
Cleaning Data

Identifying Keys

Shaping Tables

Combining
Queries

Modifying M Code

*Copyright 2021, Maven Analytics, LLC


ADDING CONDITIONAL COLUMNS

Conditional columns allow you to define new fields based on logical rules (IF statements)

In this case we’re creating a new conditional column called “QuantityType”,


Cleaning Data which depends on the values in the “OrderQuantity” column, as follows:

• If Unit Price <= 100, then Price Range = “Low”

Identifying Keys • If Unit Price < 1,000, then Price Range = “Mid”
• If Unit Price >=1,000, then Price Range = “High”
• Otherwise, Price Range = “Unclassified”
Shaping Tables

Combining
Queries

Modifying M Code

*Copyright 2021, Maven Analytics, LLC


ADDING COLUMNS FROM EXAMPLE

Columns from examples allow you to add new columns by providing an example value
• Column examples can be created from individual or all existing columns in the table

Cleaning Data

Identifying Keys

Shaping Tables New column created Creates column using text


based on example before delimiter transformation

Combining
Queries

Modifying M Code

PRO TIP: Use this when you know the outcome you want but don’t know which
transformation, or group of transformations, to use

*Copyright 2021, Maven Analytics, LLC


GROUPING & AGGREGATING DATA

Group by allows you to aggregate your data at a different level


• For example: Transform daily data into monthly, roll up transaction-level data by store, etc.

Cleaning Data

Identifying Keys

Shaping Tables

Combining
Queries

Modifying M Code

In this case we’re transforming a daily, transaction-level table


into a summary of “TotalQuantity” rolled up by “ProductKey”

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

*Copyright 2021, Maven Analytics, LLC


PIVOTING & UNPIVOTING

“Pivoting” is a fancy way to describe the process of turning distinct row values into
columns (“pivoting”) or turning columns into rows (“unpivoting”)

Cleaning Data

Identifying Keys

Imagine that the table is on a hinge;


Shaping Tables
pivoting is like rotating it from a vertical to
a horizontal layout, and unpivoting is like
Combining rotating it from horizontal to vertical
Queries

Modifying M Code
HEY THIS IS IMPORTANT!
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

*Copyright 2021, Maven Analytics, LLC


MERGING QUERIES

Merging queries allows you to join tables based on a common column

Cleaning Data

Identifying Keys

In this case we’re merging the Maven Cycles Sales table with the Maven Cycles
Products table, which share a common “Product_Key” column
Shaping Tables
NOTE: Merging adds columns to an existing table

Combining
Queries

HEY THIS IS IMPORTANT!


Modifying M Code Just because you can merge tables, doesn’t
mean you should.
In general, it’s better to keep tables separate
and define relationships between them in
your data model

*Copyright 2021, Maven Analytics, LLC


APPENDING QUERIES

Appending queries allows you to combine (or stack) tables that share the exact same
column structure and data types

Cleaning Data

Identifying Keys

Shaping Tables
In this case we’re appending the Maven Cycles Sales – 2019 table to the Maven Cycles Sales – 2020
table, which is valid since they share identical table structures
Combining
Queries NOTE: Appending adds rows to an existing table

Modifying M Code
PRO TIP: Use the “Folder” option (Get Data > More >
Folder) to append all files within a folder (assuming they
share the same structure); as you add new files, simply
refresh the query and they will automatically append!

*Copyright 2021, Maven Analytics, LLC


MODIFYING QUERIES

Select Transform Data from the


Home tab to launch the Query Editor

Cleaning Data

Identifying Keys

Shaping Tables
View or modify existing
queries in the “Queries” pane
Combining
Queries

Modifying M Code

Within each query, you can click each item within the “Applied Steps” pane to view each stage of the
transformation, add new steps, delete existing ones, or modify individual steps by clicking the gear icons

*Copyright 2021, Maven Analytics, LLC


INTRO TO M CODE

Data Mashup, or M code, is the formula language that drives Power Query

The Query Editor writes the corresponding M code


Cleaning Data

Identifying Keys

Shaping Tables

Combining
Queries

Modifying M Code

A new Applied Step is


Use the UI tools to sort added for Sorted Rows
Product_Key ascending

*Copyright 2021, Maven Analytics, LLC


EDITING & ADDING APPLIED STEPS

Although you can perform many transformations with the Power Query UI tools, you can
do even more by directly editing or writing new M code

Cleaning Data
Click on an applied step to edit Click the fx button to open a Blank Query
the M code from the formula bar and write your own custom applied step
Identifying Keys

Shaping Tables

Combining
Queries

Modifying M Code

*Copyright 2021, Maven Analytics, LLC


ADVANCED EDITOR (INTRO TO M CODE)

Opening the advanced editor allows you to see the M code that makes up your query,
which consists of two blocks:
1. let: the definition of all variables
Cleaning Data
2. in: the output of your query

Identifying Keys

let block that defines Variable names that match the


all the variables individual steps in the Applied Steps pane
Shaping Tables

Combining
Queries

Modifying M Code

in block that is the final output Final output variable Function called that reorders
of all variables in the query columns within the table
*Copyright 2021, Maven Analytics, LLC
COMMON FUNCTION CATEGORIES

TABLE LIST TEXT DATE


Functions Functions Functions Functions
Functions to create and
Cleaning Data Functions to create and Functions to create and Functions to create and
manipulate date, datetime,
manipulate table values manipulate list values manipulate text values
and datetimezone values

Identifying Keys Common Examples: Common Examples: Common Examples: Common Examples:
• Table.FromList • List.Select • Text.Length • Date.EndOfMonth
• Table.ToList • List.Contains • Text.From • Date.EndOfQuarter
• Table.IsEmpty • List.Union • Text.Middle • Date.Day
Shaping Tables
• Table.FindText • List.Median • Text.Contains • Date.StartOfWeek
• Table.RemoveColumns • List.Numbers • Text.Remove • Date.StartOfMonth
• Table.Contains • Text.BeforeDelimiter
Combining
Queries
Table function categories: List function categories: Text function categories:
• Table construction • Selection • Information
Modifying M Code • Conversion • Membership • Text comparisons
• Information • Set operations • Extraction
• Row operations • Ordering • Membership
• Column operations • Generators • Modification
• Membership • Transformations

*Copyright 2021, Maven Analytics, LLC


M CODE SYNTAX

Let's say we want to filter Maven Cycles Sales where the quantity sold equals 2

Cleaning Data
In order to accomplish this, we need to write the following code as an applied step:

Identifying Keys

= Table.SelectRows(#"Reordered Columns", each ([Quantity_Sold] = 2))


Shaping Tables

Combining FUNCTION NAME PREVIOUS STEP FUNCTION ARGUMENTS


Queries This example uses a table function to This function will be applied after The function in this example requires
select certain rows based on filter criteria the Reordered Columns step a filter condition (quantity sold = 2)

Modifying M Code

*Copyright 2021, Maven Analytics, LLC


MODELING THE DATA

Prepare the Data Model the Data Visualize the Data Analyze the Data Deploy & Maintain
Deliverables
• Get data from different sources • Design a Data Model • Create reports • Enhance reports to expose • Manage datasets
insights
• Profile the data • Develop a data model • Create dashboards • Create and manage workspaces
• Perform advanced analysis
• Clean, transform, and load data • Create measures using DAX • Enrich reports for usability

• Optimize Performance

*Copyright 2021, Maven Analytics, LLC


DATA MODELING

In this section we’ll cover core data modeling topics, including designing a data model,
developing a data model, and optimizing model performance

TOPICS WE’LL COVER: COMMON QUESTIONS:

• You have multiple tables in your data model and need


Data Model 101 Table Roles to show MTD revenue compared to last year. Which of
the following actions should you take?

Table Relationships Data Model Types • In order to reduce the size of your data model, what
should you do with a DateTime column that contains
unique values for each record in the table?
Date Tables Optimization Tips • Which of the following relationship types is the most
efficient way to connect a fact and lookup table?

*Copyright 2021, Maven Analytics, LLC


WHAT’S A “DATA MODEL”?

This IS NOT a data model


Data Model 101

• This is a collection of independent tables,


Table Roles which share no connections or relationships
• If you tried to visualize Revenue and Profit by
Table Country, this is what you’d get
Relationships

Data Model Types

Date Tables

Optimization Tips

*Copyright 2021, Maven Analytics, LLC


WHAT’S A “DATA MODEL”?

This IS a data model


Data Model 101

• The tables are connected via relationships,


Table Roles based on their common fields
• Now the Sales table knows how to filter using
Table fields from the Products & Regions tables!
Relationships

Data Model Types

Date Tables

Optimization Tips

*Copyright 2021, Maven Analytics, LLC


DATA MODEL BEST PRACTICES

A well-designed model is critical and


Data Model 101 ideally should:

Table Roles
✓ Use a star schema with one-to-many (1:*)
relationships

Table ✓ Contain relationships with one-way filters


Relationships (vs. bidirectional)
✓ Contain tables that each serve a specific
Data Model Types
purpose, including data (fact) tables and
lookup (dim) tables
Date Tables ✓ Only include the data you need for analysis
(no redundant or unnecessary records or fields)
Optimization Tips ✓ Split out individual date and time components
from DateTime fields

*Copyright 2021, Maven Analytics, LLC


DATA TABLES VS LOOKUP TABLES

Models generally contain two types of tables: Data tables & Lookup tables
• Data (or “fact”) tables contain measurable metrics about the business (quantity, revenue, views, etc.)
Data Model 101
• Lookup (or “dimension”) tables provide descriptive attributes about each dimension in your model
(customers, products, etc.)
Table Roles

Table
Relationships

Data Model Types


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

Date Tables

Optimization Tips

This Data Table contains “quantity” This Product Lookup table provides additional attributes about each product (brand, name, price, etc.)
values, and connects to lookup tables via
the “date” and “product_id” columns

*Copyright 2021, Maven Analytics, LLC


PRIMARY VS FOREIGN KEYS

Data Model 101

Table Roles

Table
Relationships

Data Model Types

Date Tables These columns are foreign keys; they These columns are primary keys; they uniquely identify each row of a
contain multiple instances of each table, and match the foreign keys in related data tables
value, and are used to match the
Optimization Tips primary keys in related lookup tables

*Copyright 2021, Maven Analytics, LLC


RELATIONSHIPS VS MERGED TABLES

Can’t I just merge queries or use LOOKUP or RELATED functions to pull those
attributes into the fact table itself, so that I have everything in one place??
Data Model 101 -Anonymous confused man

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

Table
Relationships

Data Model Types

Date Tables

Sure, you can but it’s inefficient!


Optimization Tips
• Merging data in this way creates redundant data and utilizes significantly more memory and
processing power than creating relationships between multiple small tables

*Copyright 2021, Maven Analytics, LLC


CREATING TABLE RELATIONSHIPS

Option 1: Click and drag to connect primary and Option 2: Add or detect relationships using
foreign keys within the Relationships pane the “Manage Relationships” dialog box
Data Model 101

Table Roles

Table
Relationships

Data Model Types

Date Tables

Optimization Tips

*Copyright 2021, Maven Analytics, LLC


RELATIONSHIP CARDINALITY

Cardinality refers to the uniqueness of values in a column


• As a best practice, all relationships in the data model should follow a “one-to-many” cardinality:
Data Model 101
one instance of each primary key, but potentially many instances of each foreign key

Table Roles

Table
Relationships
In this case, there is only ONE instance of each Product Key in the Products
table (noted by the “1”), since each row contains attributes of a single product
Data Model Types (Name, Unit Cost, Unit Price, Price Range, etc.)

There are MANY instances of each Product Key in the Sales table (noted by
Date Tables
the asterisk *), since there are multiple sales associated with each product

Optimization Tips

*Copyright 2021, Maven Analytics, LLC


FILTER FLOW

Here we have a single data table, Sales,


Data Model 101 connected to Products & Regions lookups
Note the filter directions (arrows) in each relationship;
Table Roles
by default, these will point from the “one” side of the
relationship (lookups) to the “many” side (data)
Table
Relationships • When you filter a table, that filter context is
passed along to all related “downstream” tables
Data Model Types
(following the direction of the arrow)
• Filters cannot flow “upstream”
(against the direction of the arrow)
Date Tables

Optimization Tips
PRO TIP: Arrange your lookup tables above your data tables in your model as a visual
reminder that filters flow “downstream”

*In some cases, filters may default to “two-way” depending on your Power BI Desktop settings *Copyright 2021, Maven Analytics, LLC
ACTIVE & INACTIVE RELATIONSHIPS

There are two key types of physical table relationships: Active & Inactive
• Active relationships are the primary means of filter propagation in your data model
Data Model 101
• Inactive relationships filter propagation during a calculation defined using DAX expressions

Table Roles

Table These are physical relationships:


Relationships
• Visible links between tables (typically 1:* cardinality)
Data Model Types • Can be active or inactive
• Active shown with solid line
• Inactive shown by dotted line
Date Tables
• Can be accessed using DAX functions like RELATED,
RELATEDTABLE or USERELATIONSHIP (inactive only)
Optimization Tips
• Best way to connect tables (but not always possible)

*Copyright 2021, Maven Analytics, LLC


CREATING “SNOWFLAKE” SCHEMAS

The Sales table can connect to Products using the


Data Model 101
Product Key field, but cannot connect directly to the
Subcategories or Categories tables
Table Roles

By creating relationships from Products to Subcategories


Table (using ProductSubcategoryKey) and Subcategories to
Relationships
Categories (using ProductCategoryKey), we have
essentially connected Sales_Data to each lookup table;
Data Model Types
filter context will now flow all the way down the chain

Date Tables

Optimization Tips

PRO TIP: Models with chains of dimension tables are often called “snowflake” schemas
(whereas “star” schemas usually have individual lookup tables surrounding a central data table)

*Copyright 2021, Maven Analytics, LLC


AUTOMATIC DATE TABLES

By default, Power BI automatically creates a hidden date table for any table that
contains a Date or DateTime column on the one-side of a relationship
Data Model 101
• Auto-generated calendars include all dates through the end of the year, regardless of the
actual date range in the table
Table Roles

Table
Relationships

Data Model Types

Date Tables

Optimization Tips

Automatically creates a hidden date table containing all these columns

*Copyright 2021, Maven Analytics, LLC


PROS & CONS: AUTOMATIC DATE TABLES

PROS: CONS:
Data Model 101
• Automatically generated • Hidden from view, cannot be modified/customized

Table Roles • Enables (some) time intelligence • Generated for every date field across every
functionality by default lookup/dimension table (bloats model size)
Table • Simplifies data model creation and • Can’t be enabled or disabled at the table-level
Relationships
management
• Hierarchies aren’t automatically generated (if grouped by
Data Model Types
• Does not require an advanced month, would summarize that month across ALL years)
understanding of DAX
• Each automatic date table can only filter the table it
corresponds to (cannot traverse table relationships)
Date Tables

Optimization Tips
PRO TIP: Turn OFF the auto date/time feature in Power BI Desktop and either import a
date dimension table or create your own using CALENDAR functions

*Copyright 2021, Maven Analytics, LLC


DATE TABLE REQUIREMENTS

If you import or create your own date table, it must meet these requirements:
Data Model 101
✓ Must contain all the days for all years represented in your fact tables
✓ Must have at least one field set as a Date or DateTime datatype
Table Roles ✓ Cannot contain duplicate dates or datetime values
✓ If using a time component within a date column, all times must be identical (i.e. 12:00)
Table
Relationships ✓ Should be marked as a date table (not required but a best practice)

Data Model Types

HEY THIS IS IMPORTANT!


Date Tables
If Time is present in your date field, split the time component into a new column
(this adheres to relationship requirements and decreases column cardinality)
Optimization Tips

*Copyright 2021, Maven Analytics, LLC


MODEL OPTIMIZATION TIPS

Normalization is the process of organizing the tables and columns in a relational


database to reduce redundancy and preserve data integrity
Data Model 101
It’s commonly used to:
Table Roles • Eliminate redundant data to decrease table sizes and improve processing speed & efficiency
• Minimize errors and anomalies from data modifications (inserting, updating or deleting records)
Table • Simplify queries and structure the database for meaningful analysis
Relationships
• Identify poorly performing measures and relationships
• Create 1:* relationships
Data Model Types
• Separate Time component form a DateTime filed
• Aggregate data
Date Tables

Optimization Tips
PRO TIP: In a normalized database, each table should serve a distinct and specific
purpose (i.e. product information, dates, transaction records, customer attributes, etc.)

*Copyright 2021, Maven Analytics, LLC


DAX CALCULATIONS

In this section we’ll cover Data Analysis Expressions, or DAX, which is the formula language
that drives front-end calculated tables, columns, and measures in Power BI

TOPICS WE’LL COVER: COMMON QUESTIONS:

Calculated Columns Aggregation • You need to create a calculated table that returns the
top 50 revenue generating products. How should you
& Measures Functions
complete the following DAX calculation?

CALCULATE • How would you complete the following DAX calculated


CALCULATE table expression, so it returns a table of the top 25
Modifiers
customers based on Total Revenue?
• How would you set up a quick measure to create a
Table Functions Time Intelligence monthly rolling average for Transactions?

*Copyright 2021, Maven Analytics, LLC


MEET DAX

Data Analysis Expressions, known as DAX, is the formula language that drives Power BI
Calculated Columns With DAX, you can:
& Measures
• Add calculated columns and measures to your model, using intuitive syntax
Aggregation • Go beyond the capabilities of traditional “grid-style” formulas, with powerful and flexible functions
Functions
built specifically to work with tabular data models

CALCULATE
Two ways to use DAX
CALCULATE
Modifiers 1) Calculated Columns 2) Measures

Table Functions

Time Intelligence

*Copyright 2021, Maven Analytics, LLC


CALCULATED COLUMNS

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


Calculated Columns
• They refer to entire tables or columns
& Measures (no “A1-style” references)
• They generate values for each row, which are
Aggregation
Functions visible within tables in the Data view
HEY THIS IS IMPORTANT!
• They understand row context; they’re great for
As a rule of thumb, use calculated columns
CALCULATE defining properties based on information in each when you want to “stamp” static, fixed values
row, but generally useless for aggregation to each row in a table (or use the Query Editor!)
CALCULATE (SUM, COUNT, etc.) DO NOT use calculated columns for aggregation
Modifiers formulas, or to calculate fields for the “Values”
• They increase the size of your data model!
area of a visualization (use measures instead)
Table Functions

Time Intelligence

PRO TIP: Creating calculated columns as close to the source as possible helps reduce
data model size and improve performance

*Copyright 2021, Maven Analytics, LLC


MEASURES

Measures are DAX formulas used to generate new calculated values


Calculated Columns
• Like calculated columns, measures reference entire
& Measures tables or columns (no A1-style or “grid” references)
• Unlike calculated columns, measure values aren’t
Aggregation
Functions visible within tables; they can only be “seen” within
a visualization like a chart or matrix (similar to a HEY THIS IS IMPORTANT!
calculated field in an Excel pivot) As a rule of thumb, use measures (vs.
CALCULATE
calculated columns) when a single row
• Measures are evaluated based on filter context, can’t give you the answer (in other
CALCULATE which means they recalculate when the fields or words, when you need to aggregate)
Modifiers filters around them change (like when new row or
column labels are pulled into a matrix or when new
Table Functions
filters are applied to a report)

Time Intelligence
PRO TIP: Use measures to create numerical, calculated values that can be analyzed
in the “values” field of a report visual

*Copyright 2021, Maven Analytics, LLC


RECAP: CALCULATED COLUMNS VS. MEASURES

CALCULATED COLUMNS MEASURES


Calculated Columns • Values are calculated based on information from each • Values are calculated based on information from any
& Measures row of a table (has row context) filters in the report (has filter context)

Aggregation • Appends static values to each row in a table and stores • Does not create new data in the tables themselves
Functions 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
CALCULATE are made to component columns the report

• Primarily used as rows, columns, slicers or filters • Almost always used within the values field of a visual
CALCULATE
Modifiers

Table Functions

Time Intelligence

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


tables

*Copyright 2021, Maven Analytics, LLC


QUICK MEASURES

Quick measures are pre-built formula templates that allow you to drag and drop fields
rather than write DAX from scratch
Calculated Columns
& Measures • They are helpful for defining complex measures (like weighted averages or time intelligence formulas)

Aggregation
Functions

CALCULATE

CALCULATE
Modifiers The value you want a
rolling average of

Table Functions
The date field over
which to calculate the
rolling average
Time Intelligence
The time periods
between which you
want the average

*Copyright 2021, Maven Analytics, LLC


COMMON DAX FUNCTION CATEGORIES

MATH & STATS LOGICAL TEXT FILTER DATE & TIME


Functions Functions Functions Functions Functions
Calculated Columns
& Measures Basic aggregation Functions that return Functions to manipulate Lookup functions based Basic date & time
functions as well as information about values text strings or control on related tables and functions as well as
“iterators” evaluated at based on a given formats for dates, times filtering functions for advanced time
Aggregation the row-level conditional expression or numbers dynamic calculations intelligence operations
Functions
Common Examples: Common Examples: Common Examples: Common Examples: Common Examples:
• SUM • IF • CONCATENATE • CALCULATE • DATEDIFF
CALCULATE • AVERAGE • IFERROR • FORMAT • FILTER • YEARFRAC
• MAX/MIN • AND • LEFT/MID/RIGHT • ALL • YEAR/MONTH/DAY
• DIVIDE • OR • UPPER/LOWER • ALLEXCEPT • HOUR/MINUTE/SECOND
CALCULATE • COUNT/COUNTA • NOT • PROPER • RELATED • TODAY/NOW
Modifiers • COUNTROWS • SWITCH • LEN • RELATEDTABLE • WEEKDAY/WEEKNUM
• DISTINCTCOUNT • TRUE • SEARCH/FIND • DISTINCT
• FALSE • REPLACE • VALUES Time Intelligence Functions:
Iterator Functions: • REPT • EARLIER/EARLIEST
Table Functions • DATESYTD
• SUBSTITUTE • HASONEVALUE
• SUMX • DATESQTD
• TRIM • HASONEFILTER
• AVERAGEX • DATESMTD
• UNICHAR • ISFILTERED
• MAXX/MINX • DATEADD
• USERELATIONSHIP
• RANKX • DATESINPERIOD
Time Intelligence • TOPN
• COUNTX

NOTE: This is NOT a comprehensive list (does not include trigonometry functions, parent/child functions, information functions, or other less common functions) *Copyright 2021, Maven Analytics, LLC
BASIC AGGREGATION FUNCTIONS

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


Calculated Columns
& Measures

Returns the average (arithmetic mean)


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

Returns the largest value in a column or


CALCULATE
MAX() between two scalar expressions
=MAX(ColumnName) or =MAX(Scalar1, [Scalar2])

CALCULATE
Modifiers Returns the smallest value in a column
MIN() or between two scalar expressions =MIN(ColumnName) or =MIN(Scalar1, [Scalar2])
Table Functions
Performs division and returns the
DIVIDE() alternate result (or blank) if div/0
=DIVIDE(Numerator, Denominator, [AlternateResult])
Time Intelligence

*Copyright 2021, Maven Analytics, LLC


DAX SYNTAX

MEASURE NAME
Measures are always surrounded in Referenced Referenced
Calculated Columns
& Measures brackets (i.e. [Total Quantity]) when TABLE NAME COLUMN NAME
referenced in formulas, so spaces are OK

Aggregation
Functions Total Quantity: =SUM(Transactions[quantity])
CALCULATE
Note: This is a “fully qualified” column, since it’s preceded by the table
FUNCTION NAME name -- table names with spaces must be surrounded by single quotes:
Calculated columns don’t always
CALCULATE use functions, but measures do: • Without a space: Transactions[quantity]
Modifiers • With a space: ‘Transactions Table’[quantity]
• In a Calculated Column, =Transactions[quantity]
returns the value from the quantity column in each
Table Functions row (since it evaluates one row at a time)

• In a Measure, =Transactions[quantity] will return


an error since Power BI doesn’t know how to
Time Intelligence translate that as a single value (you need some sort PRO TIP: For column references, use the fully qualified
of aggregation)
name (i.e. Table[Column]); for measure references, just
use the measure name (i.e. [Measure])

*Copyright 2021, Maven Analytics, LLC


ITERATOR (“X”) FUNCTIONS

Iterator (or “X”) functions allow you to loop through the same calculation on each row of
a table, and then apply some sort of aggregation to the results (SUM, MAX, etc.)
Calculated Columns
& Measures

Aggregation =SUMX(Table, Expression)


Functions

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


to calculated rows* expression will be evaluated each row of the given table

CALCULATE Examples: Examples: Examples:


Modifiers • SUMX • ‘Sales’ • [Total Orders]
• COUNTX • FILTER(‘Sales’, • Sales[RetailPrice] * Sales[Quantity]
• AVERAGEX RELATED(
Table Functions • RANKX ‘Products’[Category])=“Clothing”)
• MAXX/MINX

Time Intelligence
PRO TIP: Imagine the function adding a temporary new column to the table, calculating the value
in each row (based on the expression) and then applying the aggregation to that new column

*In this example we’re looking at SUMX, but other “X” functions follow a similar syntax *Copyright 2021, Maven Analytics, LLC
DIVIDE

DIVIDE() Safe Divide function with ability to handle divide by zero cases

Calculated Columns
& Measures
=DIVIDE(Numerator, Denominator, [AlternateResult])
Aggregation
Functions
Numerator of the equation Denominator of the equation Optional parameter to specify a
result in case of divide by zero
CALCULATE Examples: Examples:
• 4,7,10, etc. • 2, 3, 8, etc. Examples:
• [Total Returns] • [All Returns] • “-”
CALCULATE
Modifiers
• [Sales Amount] • CALCULATE( [Sales Amount], • “N/A”
ALLSELECTED( • 0
‘Products’[Category])
Table Functions

Time Intelligence

*Copyright 2021, Maven Analytics, LLC


CALCULATE

CALCULATE() Evaluates a given expression or formula under a set of defined filters

Calculated Columns
& Measures
=CALCULATE(Expression, [Filter1], [Filter2],…)
Aggregation
Functions
Name of an existing measure, or a DAX List of simple Boolean (True/False) filter expressions
formula for a valid measure (Note: these require simple, fixed values; you cannot
CALCULATE
create filters based on other measures)
Examples:
• [Total Orders] Examples:
CALCULATE
Modifiers • SUM(Returns[ReturnQuantity]) • Territory_Lookup[Country] = “USA”
• Calendar[Year] > 1998

Table Functions

Time Intelligence
PRO TIP: CALCULATE works just like SUMIF or COUNTIF in Excel, except it can evaluate measures
based on ANY sort of calculation (not just sum, count, etc.); it may help to think of it like “CALCULATEIF”

*Copyright 2021, Maven Analytics, LLC


CALCULATE (EXAMPLE)

We’ve defined a new measure named “Australian Orders”, which evaluates the “Total
Orders” measure when the Country in the Regions table equals “Australia”
Calculated Columns
& Measures

Aggregation
Functions

CALCULATE

CALCULATE HEY THIS IS IMPORTANT!


Modifiers
CALCULATE modifies and overrules any competing filter context!
In this example, the “France” row has filter context of
Table Functions Country = “France” (defined by the row label) and
Country= “Australia” (defined by the CALCULATE function)
Wait, why do we see repeating values when we Both can’t be true at the same time, “France” filter is overwritten,
Time Intelligence view a matrix with different countries on rows?
and the “Australia” filter (from CALCULATE) takes priority
Shouldn’t these cells have different filter contexts
for Canada, Germany, France, etc.?

*Copyright 2021, Maven Analytics, LLC


CALCULATE CREATES NEW FILTER CONTEXT

CALCULATE If the measure being evaluated contains a CALCULATE


Filters modified by function, filter context is overwritten between Steps 1 & 2
Calculated Columns CALCULATE
& Measures
[Country] = “Australia”

Aggregation
STEP 1 STEP 2 STEP 3
Functions Filter context is Filters flow “downstream” Measure formula evaluates
detected & applied to all related tables against the filtered table
CALCULATE
Region Table

Australia
Region Table
CALCULATE
Modifiers Australia
Count of the rows in the
Sales Data table, filtered
down to only rows where
= 23,936
Table Functions 1
Regions[Country] = “United States” the country is “Australia”

Region Table *
Time Intelligence Sales Data
United States
Australia

*Copyright 2021, Maven Analytics, LLC


COMMON CALCULATE MODIFIERS

Modifiers are used to alter the way CALCULATE creates filter context, and are added as
filter arguments within a CALCULATE function
Calculated Columns
& Measures • Modifiers are typically used to change filter context, access inactive table relationships, or change the
way filters propagate (i.e. one-way to bidirectional)
Aggregation
Functions

CALCULATE Modify Use Change


Filters Relationships Filter Propagation
CALCULATE
Modifiers Common Examples: Common Examples: Common Examples:
• ALL • USERELATIONSHIP • CROSSFILTER
Table Functions • ALLSELECTED
• ALLNOBLANKROW
• ALLEXCEPT
Time Intelligence • KEEPFILTERS
• REMOVEFILTERS

*Copyright 2021, Maven Analytics, LLC


CALCULATE MODIFIERS

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


Calculated Columns
& Measures
CALCULATE filter expressions accept both Boolean & table functions (individually or
Aggregation
at the same time!), but all filter arguments are automatically converted into a table
Functions

CALCULATE

DAX interprets this as a table!


CALCULATE
Modifiers • Any time you use write a function that contains a
logical statement (IN, >,<, =, etc.) you’re creating a
table (internally processed with FILTER & ALL)
Table Functions

Time Intelligence Filter arguments can be table functions too


• In this case we’re using the ALL table function to
remove all filters from the ‘Store Lookup’ table

*Copyright 2021, Maven Analytics, LLC


USERELATIONSHIP

Specifies an existing relationship to be used in the evaluation of a DAX expression,


USERELATIONSHIP() defined by naming, as arguments, the two columns that serve as endpoints
Calculated Columns
& Measures

Aggregation =USERELATIONSHIP(ColumnName1, ColumnName2)


Functions

CALCULATE Foreign (or primary) key of the Primary (or foreign) key of the HEY THIS IS IMPORTANT!
relationship relationship
USERELATIONSHIPS can only
CALCULATE be used in functions which
Examples: Examples:
Modifiers
accept a filter parameter
• Food Inventory[Baked_Date] • Calendar[Transaction Date] (CALCULATE, TOTALYTD, etc.)
Table Functions • Calendar[Transaction Date] • Food Inventory[Baked_Date]

Time Intelligence
PRO TIP: If you have multiple date columns connected to a single calendar table, USERELATIONSHIP is a great
way to force measures to use inactive relationships without having to manually activate them in your model

*Copyright 2021, Maven Analytics, LLC


ALL

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

Calculated Columns
& Measures
=ALL(Table or ColumnName, [ColumnName1], [ColumnName2],…)
Aggregation
Functions
The table or column that you want to List of columns that you want to clear filters on (optional)
clear filters on
CALCULATE Notes:
Examples: • If your first parameter is a table, you can’t
• ‘Sales’ specify additional columns
CALCULATE
Modifiers • ‘Products’[ProductName] • All columns must include the table name, and
come from the same table

Table Functions Examples:


• ‘Products’[Product Type]
• ‘Products’[Product Size]
Time Intelligence

PRO TIP: Instead of adding filter context, ALL removes it; use it when you need unfiltered values that
won’t react to changes in filter context (i.e. % of Total, where the denominator needs to remain fixed)

*Copyright 2021, Maven Analytics, LLC


FILTER

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

Calculated Columns
& Measures
=FILTER(Table, FilterExpression)
Aggregation
Functions
Table to be filtered A Boolean (True/False) filter expression HEY THIS IS IMPORTANT!
to be evaluated for each row of the table FILTER is used to add new filter context,
CALCULATE Examples: and can handle more complex filter
• Gender Lookup Examples: expressions than CALCULATE (by
• Customer Lookup • Calendar[Year] = 2020 referencing measures, for example)
CALCULATE
Modifiers
• Products[Price] > [Avg Price]
Since FILTER returns an entire table, it’s
almost always used as an input to other
Table Functions functions, like CALCULATE or SUMX

Time Intelligence

PRO TIP: Since FILTER iterates through each row in a table, it can be slow and processor-intensive;
don’t use FILTER if a CALCULATE function will accomplish the same thing

*Copyright 2021, Maven Analytics, LLC


TOPN

TOPN() Returns a given number of top rows according to a specified expression

Calculated Columns
& Measures
=TOPN(N_Value, TableName, [OrderBy Expression], [Order])
Aggregation
Functions
The number of Name of a table or table expression Optional expression that’s Optional expression that
rows to return that you want to return rows from used to sort the table defines the sort order
CALCULATE
Examples: Examples: Examples: Examples:
• 100 • ‘Maven Cycles Sales’ • ‘Sales’ • DESC
CALCULATE
Modifiers • 50 • ALL( ‘Maven Cycles Sales’) • ASC
• 10 • SUMMARIZE( ‘Sales’,
• 5 ‘Sales’[Customer_ID],
Table Functions “Sales”,
SUM(‘Sales by Store’[Sales]))

Time Intelligence

PRO TIP: TOPN is a great technique to use when you want to show the top “X” number
in visuals and not add a visual-level Top N filter

*Copyright 2021, Maven Analytics, LLC


TIME INTELLIGENCE FORMULAS

Time Intelligence functions allow you to easily calculate common time comparisons:
Calculated Columns
& Measures
Performance =CALCULATE([Measure], DATESYTD(Calendar[Date]))
Aggregation To-Date Use DATESQTD for Quarters or DATESMTD for Months
Functions

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


Period
Select an interval (DAY, MONTH, QUARTER, or YEAR) and the # of
CALCULATE intervals to compare (i.e. previous month, rolling 10-day)
Modifiers
Running =CALCULATE([Measure],
Total DATESINPERIOD(Calendar[Date], MAX(Calendar[Date]), -10, DAY))
Table Functions

Time Intelligence

PRO TIP: Use DATESBETWEEN to return dates between two given dates

*Copyright 2021, Maven Analytics, LLC


VISUALIZING THE DATA

Prepare the Data Model the Data Visualize the Data Analyze the Data Deploy & Maintain
Deliverables
• Get data from different sources • Design a Data Model • Create reports • Enhance reports to expose • Manage datasets
insights
• Profile the data • Develop a data model • Create dashboards • Create and manage workspaces
• Perform advanced analysis
• Clean, transform, and load data • Create measures using DAX • Enrich reports for usability

• Optimize Performance

*Copyright 2021, Maven Analytics, LLC


CREATING REPORTS & DASHBOARDS

In this section we’ll cover creating reports & dashboards, including adding & formatting
visuals, interacting with reports, and publishing to Power BI Service

TOPICS WE’LL COVER: COMMON QUESTIONS:

• How would you adjust visual interactions so a segment


Inserting Visuals Formatting Visuals
selection on one chart shows the portion of sales on the
other chart?
Report Navigation Tooltips • What feature allows you to see additional detail about a
data point when you hover?

Custom Visuals R & Python Visuals • You need to build a report that is optimized for viewing on
the Power BI mobile app. What steps are needed to build
a mobile report?
Accessibility Dashboards

*Copyright 2021, Maven Analytics, LLC


THE POWER BI REPORT VIEW
VIEW OPTIONS
Inserting Visuals Themes, Layouts, Gridlines, Filter/ VISUALIZATION OPTIONS
Bookmarks/Selection Panes, etc. Charts, Slicers, Maps, Matrices, etc.

Formatting Visuals

FIELD LIST
Report Navigation Tables, Columns, Measures

Tooltips FIELDS/FORMAT/
ANALYICTS PANE
Visual-specific configuration
& formatting tools
Custom Visuals

R & Python
DRILL THROUGH FILTERS
Visuals Options for page-level drill
through filters

Accessibility

Dashboards

REPORT PAGES FILTERS PANE


Similar to Excel tabs; each is a blank reporting canvas Visual-Level, Page-Level, and Report-Level Filters
*Copyright 2021, Maven Analytics, LLC
INSERTING OBJECTS & BASIC CHARTS

Inserting Visuals

Formatting Visuals
Select a visualization type to create
a blank chart template on the canvas
Report Navigation

Tooltips

(or)
Custom Visuals

R & Python Drag fields into the report canvas to


Visuals automatically generate a new visual
(typically a column chart, by default)
Accessibility

Dashboards

*Copyright 2021, Maven Analytics, LLC


FORMATTING OPTIONS

Inserting Visuals Example: Line & Column Chart Example: Matrix Example: Donut Chart

Formatting Visuals

Report Navigation

Tooltips

Custom Visuals

R & Python
Visuals

Accessibility

Dashboards

*Copyright 2021, Maven Analytics, LLC


EDITING REPORT INTERACTIONS

Inserting Visuals Report interactions allow you to define how filters applied to one visual impact the others

Formatting Visuals

Report Navigation
By selecting the date slicer and enabling “Edit interactions” from the Format tab, we
can manually determine which visuals should “react” when the date range changes

Tooltips

Custom Visuals

R & Python
Visuals

Accessibility

Dashboards In this case the Product matrix, Country slicer and Map will filter in response to date
slicer changes ( ), but the MTD, QTD, and YTD Profit cards will not ( )

*Copyright 2021, Maven Analytics, LLC


EDITING REPORT INTERACTIONS (CONT.)

Inserting Visuals For certain types of visuals, a third option allows you to “highlight” subsegments of the
data, rather than simply filtering vs. not filtering
Formatting Visuals

Report Navigation

Tooltips

When the interaction mode When the interaction mode


Custom Visuals is set to “filter”, selecting is set to “highlight”,
the “Bikes” category in the selecting the “Bikes”
donut chart produces a category in the donut chart
R & Python filtered list of subcategories highlights the relevant
Visuals in the chart subsegments in the chart

Accessibility

Dashboards

*Copyright 2021, Maven Analytics, LLC


DRILL-THROUGH FILTERS

Inserting Visuals Drill-through filters allow users to jump to different report pages (like bookmarks), while
simultaneously filtering based on the specific item selected
Formatting Visuals

Report Navigation

Tooltips

Custom Visuals

R & Python
Visuals

Accessibility

Here we’ve built a report page (“Decomposition Tree”) featuring country, product, and age detail, and added a Drillthrough filter for Country
Dashboards Users can now right-click any report visual containing country name, and jump straight to a pre-filtered version of this page
(“United States” shown in the example above)

*Copyright 2021, Maven Analytics, LLC


ADDING & LINKING BOOKMARKS

Inserting Visuals
In this example, we created a prefiltered
view of 1H 2020 for the executive team’s
Formatting Visuals upcoming planning session.
To do this, we add a new bookmark (View >
Bookmarks Pane > Add) and name it “1H
Report Navigation 2020”

Tooltips

Custom Visuals

R & Python
Visuals
On the report page, we add our button,
Accessibility
and link it to bookmarks using the object
“Action” properties
Now we’re able to create a narrative from
Dashboards the data, and really bring our insights to life!

*Copyright 2021, Maven Analytics, LLC


TOOLTIPS

Inserting Visuals Tooltips in Power BI are a way to add additional data when you hover over a visual

Formatting Visuals
Map that shows the Total Revenue
by country, filtered to Europe
Report Navigation

Tooltips

Custom Visuals

R & Python
Visuals

Accessibility
Tooltip shows the Total Revenue along with
Total Orders, Profit, & % of Profit for France

Dashboards

*Copyright 2021, Maven Analytics, LLC


IMPORTING CUSTOM VISUALS

Inserting Visuals Import custom visuals from files, your organization, or the AppSource marketplace
(requires sign-in) directly into Power BI
Formatting Visuals

Report Navigation

Tooltips

We’ve added a histogram


chart from the marketplace
Custom Visuals

R & Python
Visuals

Accessibility
PRO TIP: Report visuals loading slowly?
Splitting out visuals to different pages can
Dashboards relieve slow-loading pages

*Copyright 2021, Maven Analytics, LLC


R & PYTHON VISUALS

Inserting Visuals You can create visuals from queries and datasets generated in R or Python

Formatting Visuals

Report Navigation
Getting Started: Getting Started:
Tooltips 1. Install R on local machine 1. Install Python on local machine
2. Confirm R home directory 2. Install necessary packages/libraries
Custom Visuals (Matplotlib, NumPy)
Limitations: 3. Confirm Python home directory
R & Python • Plots limited to 150,000 rows
Visuals Limitations:
• Visual output limit of 2MB
• Resolution is 72 DPI • You won't be able to use Python scripts in
Accessibility
reports created with Enhanced Metadata
• Calculations > 5 minutes will time out (Preview) feature enabled
Dashboards

For information about known limitations head to:


https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals#known-limitations or https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts#known-limitations *Copyright 2021, Maven Analytics, LLC
ACCESSIBILITY FEATURES

Inserting Visuals Power BI’s different accessibility features allow consumers to easily navigate reports

Formatting Visuals
Themes allow you to set a default theme for your entire report
PRO TIP: Use the colorblind safe theme to make sure all users
Report Navigation can distinguish your report colors

Tooltips

Custom Visuals

The selection pane allows you to adjust the tab and layer order for reports
R & Python
Visuals PRO TIP: Use this on complex reports with overlapping objects
• Tab order allows you to override the default creation order and specify how
“tab” cycles between visuals
Accessibility
• Layer order allows you to change the default layer order and send objects back
or bring the forward

Dashboards

*Copyright 2021, Maven Analytics, LLC


PINNING TILES TO A DASHBOARD

Inserting Visuals Use the pushpin icon to pin an individual visual to a dashboard

Formatting Visuals

Report Navigation

Tooltips

Custom Visuals

R & Python
Visuals
HEADS UP!
Slicers have some limitations in Power BI, and cannot:
Accessibility • Drill down non-hierarchical fields
• Support visual level filters
• Be pinned to a dashboard individually
Dashboards
(they can be pinned as part of a live page)

*Copyright 2021, Maven Analytics, LLC


PINNING ENTIRE REPORTS TO A DASHBOARD

Inserting Visuals Use the Pin Live Page option to pin an entire report to a dashboard

Formatting Visuals

Report Navigation

Tooltips

Custom Visuals

R & Python
Visuals

Accessibility PRO TIP: Pinning a live page will


import slicers, preserve functionality,
and reflect any updates to the report
Dashboards

*Copyright 2021, Maven Analytics, LLC


THE DASHBOARD INTERFACE

Inserting Visuals

Formatting Visuals

TOOLBAR
Tools to add new tiles,
Report Navigation add/view comments,
ASK A QUESTION subscribe, share, set as
Allows you to use natural featured dashboard, etc.
language queries to
Tooltips generate new tiles from
within your dashboard!

Custom Visuals

R & Python
Visuals

Accessibility

Dashboards

*Copyright 2021, Maven Analytics, LLC


DASHBOARD TOOLS

Inserting Visuals

Formatting Visuals

Share via email or to Subscribe to receive


Report Navigation Microsoft Teams periodic email updates

Tooltips

Custom Visuals

Add comments & start a


R & Python
Visuals
data-driven conversation

Accessibility

Dashboards

*Copyright 2021, Maven Analytics, LLC


WEB VS. MOBILE LAYOUT

Inserting Visuals Mobile Layout allows you to design reports optimized for mobile viewing (vs. web)
• NOTE: You can’t build content within the Mobile Layout view; you need to build in Web Layout
Formatting Visuals and assemble select visuals to share via the Power BI mobile app

Report Navigation

Tooltips

Custom Visuals

R & Python
Visuals

Accessibility

Dashboards

*Copyright 2021, Maven Analytics, LLC


ANALYZING THE DATA

Prepare the Data Model the Data Visualize the Data Analyze the Data Deploy & Maintain
Deliverables
• Get data from different sources • Design a Data Model • Create reports • Enhance reports to expose • Manage datasets
insights
• Profile the data • Develop a data model • Create dashboards • Create and manage workspaces
• Perform advanced analysis
• Clean, transform, and load data • Create measures using DAX • Enrich reports for usability

• Optimize Performance

*Copyright 2021, Maven Analytics, LLC


ENHANCE REPORTS

In this section we’ll cover tools and techniques that can be used to enhance reports to expose
insights and perform advanced analysis

TOPICS WE’LL COVER: COMMON QUESTIONS:

• You need to add a visualization to a report that helps the


Basic Chart Types Analytics Options
team understand factors that drive a specific metric. What
visualization should you add?
Q&A Filtering Options • Which of the following visualizations should be used to
show the relationship between cost and revenue and help
identify possible outliers?
AI Visuals
• Which of the following options is the best way to create a
visual to show the top 10 States based on population?

*Copyright 2021, Maven Analytics, LLC


CHART TYPES BASED ON ANALYSIS

Scatter charts show the relationship Line charts are used to track Clustered Column charts compare
between two numerical values changes over periods of time values across different categories

Basic Chart Types

Analytics Options

Q&A

Common Uses: Common Uses: Common Uses:


Filtering Options
• Show patterns in large sets of data • Show changes in values over time • Show distribution of data points
• Show linear & non-linear trends • Add multiple lines to compare • Comparisons across categories
• Cluster analysis trends between series
AI Visuals • Outlier identification (categories)

*Copyright 2021, Maven Analytics, LLC


CHART ANALYTICS OPTIONS

Scatter charts Line charts Clustered Column charts

Basic Chart Types

Analytics Options

Q&A

Min & Max line adds min/max context


Filtering Options to your visual

X & Y-Axis Constant line adds a constant Average line adds the arithmetic mean
line to your visual of the values in the visual
AI Visuals Trend line adds a trend line to your visual
Median line adds a line that separates Percentile add a dynamic reference line
the higher half of data from lower half Forecast adds a forecast to your visual based on a percentage
based on a specific number of periods
Symmetry shading makes it easier to see
if the Y or X axis value is bigger. Border is Find anomalies mark datapoint outside
where the values are the same the expected range of values

*Copyright 2021, Maven Analytics, LLC


Q&A

Q&A in lets you explore your data “in your own words” using natural language queries
Q&A Tooling Interface Table & Column Synonyms

Basic Chart Types

Analytics Options

Q&A

Filtering Options
Best Practices:

AI Visuals
✓ Use new Q&A tooling to interact with queries and make improvements
✓ Add missing relationships between tables
✓ Rename tables and columns
✓ Fix incorrect data types
✓ Normalize your model (single table or column per question)
✓ Add synonyms to tables and columns
*Copyright 2021, Maven Analytics, LLC
FILTERING OPTIONS

There are four primary filter options in Power BI reports:

1. Visual Level: Applies only to the specific visual in which it is defined


Basic Chart Types 2. Page Level: Applies to all visuals on the specific page in which it is defined
3. Report Level: Applies to all visuals across all pages of the report
Analytics Options 4. Drill through: Applies to specific pages, and updates based on the item clicked

Q&A Filter settings include Basic, Advanced, and Top N options

Filtering Options

AI Visuals

Basic Options

Top N Options
Advanced (Values)

Advanced (Text)

*In the newest versions of Power BI, these tools can be found in both the Home and Insert menus *Copyright 2021, Maven Analytics, LLC
SLICERS

Slicers provide an interactive way for users to sort and filter a report

Basic Chart Types


Date slicer formatted as a slider
Can also be a list, range, or “in the past X time period” option
Analytics Options

Q&A

Categorical slicers can also be created from dimensions or attributes within


your model (Category, Store Location, Gender, etc.)
Filtering Options

AI Visuals

*Copyright 2021, Maven Analytics, LLC


AI VISUALS (KEY INFLUENCERS)

The key influencers visual helps you understand the factors that drive a specific metric

Basic Chart Types


DROP DOWN BOX
The value or metric
under investigation RIGHT PANE
Analytics Options Column chart display all values
for the key influencer theme
selected in the left pane

Q&A
LEFT PANE
Visual that shows a list
of the top key influencers
Filtering Options
AVERAGE LINE
Shows the percentage of the
other themes that increase
AI Visuals quantity sold

*Copyright 2021, Maven Analytics, LLC


AI VISUALS (DECOMPOSITION TREE)

The decomposition tree visual allows you to perform exploratory analysis by successively
breaking down a measure across multiple dimensions
• This is a great choice when you want to perform a root cause analysis or ad hoc exploration
Basic Chart Types

Analytics Options
EXPLAIN BY
One or more dimensions
used to explore measure
Q&A

Filtering Options EXPANDED TREE


ANALYZE Shows expanded tree breaking
Measure or aggregate down the measure by dimensions
value that is analyzed in the explain by columns
AI Visuals

*Copyright 2021, Maven Analytics, LLC


DEPLOY & MAINTAIN DELIVERABLES

Prepare the Data Model the Data Visualize the Data Analyze the Data Deploy & Maintain
Deliverables
• Get data from different sources • Design a Data Model • Create reports • Enhance reports to expose • Manage datasets
insights
• Profile the data • Develop a data model • Create dashboards • Create and manage workspaces
• Perform advanced analysis
• Clean, transform, and load data • Create measures using DAX • Enrich reports for usability

• Optimize Performance

*Copyright 2021, Maven Analytics, LLC


DEPLOY & MAINTAIN DELIVERABLES

In this section we’ll cover tools and techniques to deploy & maintain deliverables, including
managing datasets, refreshing data, securing datasets, and creating and managing workspaces

TOPICS WE’LL COVER: COMMON QUESTIONS:

• Which of the following steps should you take to


Scheduled Refresh Row Level Security ensure a Dataflow is updated every morning?
• What DAX expression would you use to create an RLS
Sharing Options Data Lineage role based on a manager’s Region?
• Which of the following roles can add other members
to a workspace?
Incremental Refresh Endorse Content

Storage Formats Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


SCHEDULED REFRESH (DATASET)

Scheduled Refresh Scheduled refresh allows you to keep your Power BI reports up to date by automatically
refreshing datasets based on a given frequency & time of day
Row Level Security

Select the dataset to refresh and click Scheduled


Sharing Options Refresh or Settings from the ellipsis menu options Confirm dataset refresh is working
properly (schedules align, errors, etc.)

Data Lineage

Incremental
Refresh

Storage Formats
Set a Frequency (daily or weekly), Time Zone,
and Time (half-hour increments AM/PM)
Endorse Content

HEY THIS IS IMPORTANT!


Sensitivity Labels A data gateway is required to refresh
on-premises & online data sources

*Copyright 2021, Maven Analytics, LLC


STATIC ROW-LEVEL SECURITY

Scheduled Refresh Static roles allow you to define filtered views for specific audiences (territory managers,
department leads, execs, etc.) using simple DAX statements
Row Level Security
• This is not the same as bookmarks or pre-filtered views; roles filter data out of your model and limit
what audiences can access
Sharing Options • Static roles must first be configured in Power BI Desktop and then applied in Power BI Service

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content HEY THIS IS IMPORTANT!


If a user is part of two roles, the RLS
roles are combined for the individual
Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


TESTING ROW-LEVEL SECURITY

Scheduled Refresh As a best practice, use the View as option to confirm that the security role properly
limits the data prior to publishing to Power BI Service
Row Level Security

Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


DYNAMIC ROW-LEVEL SECURITY

Scheduled Refresh Dynamic roles allow you to define filtered views for a specific list of users with the DAX
functions USERNAME or USERPRINCIPALNAME
Row Level Security
• These DAX functions require adding an additional table into your data model
• Dynamic roles must first be configured in Power BI Desktop and then applied in Power BI Service
Sharing Options
USERNAME USERPRINCIPALNAME

Data Lineage

Incremental
Refresh

Storage Formats

Dynamic role will


Endorse Content
filter by the Email
Dynamic role will filter Address in this table
by the Username in
Sensitivity Labels this table

*Copyright 2021, Maven Analytics, LLC


USERNAME

Scheduled Refresh
USERNAME() Returns the domain name and username of the current logged in user

Row Level Security


=USERNAME( )
Sharing Options
USERNAME doesn’t have any parameters

Data Lineage Examples:


• [Name] = USERNAME()
Incremental
Refresh

HEY THIS IS IMPORTANT!


Storage Formats USERNAME returns the domain and user’s username in
the format of domain-name\user-name
1. Person’s username (i.e., aaronp)
Endorse Content
2. Company domain (i.e., mavencycles)
3. USERNAME returns (i.e., mavencycles\aaronp)
Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


USERPRINCIPALNAME

Scheduled Refresh
USERPRINCIPALNAME() Returns the user’s name as their email address (i.e., [email protected])

Row Level Security


=USERPRINCIPALNAME( )
Sharing Options
USERPRINCIPALNAME doesn’t have any parameters

Data Lineage Examples:


• [Email] = USERPRINCIPALNAME()
Incremental
Refresh

HEY THIS IS IMPORTANT!


Storage Formats
User Principal Name (UPN) looks like an email address,
but technically it’s a combination of three items:
Endorse Content 1. Person’s username (i.e., aaronp)
2. “@” symbol
3. Company domain (i.e., maven inspectional services)
Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


APPLYING RLS IN SERVICE

Scheduled Refresh Once RLS rules have been defined in Power BI Desktop, they can be applied to users who
you’ve shared reports with or have Viewer permissions in Power BI Service
Row Level Security

Confirm that users impacted by RLS Add people or groups to the RLS rule
1 are assigned to the Viewer role
2
Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content
HEY THIS IS IMPORTANT!
If a user is assigned as an Admin, Member,
Sensitivity Labels or Contributor, RLS will be overridden

*Copyright 2021, Maven Analytics, LLC


PRO TIP: RLS AZURE GROUPS

Scheduled Refresh Azure Active Directory security groups allow you to manage an entire group of users
instead of a list of individual users
Row Level Security

Security Group Benefits:


Sharing Options
✓ Used to manage member and computer access
to shared resources for a group of users
Data Lineage
✓ Create specific security policies (permission
levels) for different groups of users
Incremental
Refresh ✓ Allows you to set permissions for all members
of a group at once
Storage Formats ✓ Great for managing user access when people
join and leave teams

Endorse Content

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


SUBSCRIPTIONS

Scheduled Refresh Subscribe to receive periodic email updates with a report, dashboard, or app snapshot
• Creating subscriptions requires a Pro or PPU license (self & others)
Row Level Security
• Add email, subject and an optional message
• Set frequency & time (monthly, weekly, daily, hourly)
Sharing Options
• Schedule the start and end dates

Data Lineage
Report View

Incremental
Refresh
Dashboard View
Endorse Content

App View
Storage Formats

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


SHARING OPTIONS

Scheduled Refresh
Reports Dashboards Apps

Row Level Security

Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

INDIVIDUALS TEAMS ORGANIZATIONS


Endorse Content

PRO TIP: When sharing reports & dashboards, the maximum number of recipients is 100 at a time
Sensitivity Labels (500 total); if you need to share with more than 100 recipients, split into multiple sends or use groups

*Copyright 2021, Maven Analytics, LLC


VIEWING RIGHTS

Scheduled Refresh When a developer shares a report or dashboard or publishes an app, users must have
either a pro license or access to premium capacity in order to view
Row Level Security

Sharing Options Shares


Developer

Data Lineage

Views
User Pro License? YES
Incremental
Refresh
NO

Storage Formats
Premium
YES
Capacity?

Endorse Content
NO HEY THIS IS IMPORTANT!
Users with Pro licenses can share content
Sensitivity Labels with PPU but not the other way around
No Access

*Copyright 2021, Maven Analytics, LLC


USER PERMISSIONS

Scheduled Refresh When sharing workspaces, you can assign roles based on these levels of permissions:

Row Level Security


VIEWER CONTRIBUTOR MEMBER ADMIN

Sharing Options • View workbooks, reports, Lifts Viewer restrictions, plus: All Contributor rights, plus: All Member rights, plus:
and dashboards
• Publish, create, edit, and • Add members or users with • Update/delete workspaces
• Can’t access datasets, delete content lower permission levels
Data Lineage dataflows, or edit content • Add or remove other users
• Can’t add people to new • Publish and update apps (including admins)
roles or modify members
• Share an item or app
• Can share if the content has
Incremental • Allow others to reshare
been previously shared but
Refresh
can’t share new content

Storage Formats

Endorse Content

Sensitivity Labels
PRO TIP: When assigning privileges, use the principle of
least privilege so users only have access to what they need

*Copyright 2021, Maven Analytics, LLC


PUBLISHING APPS

Scheduled Refresh You can select reports and dashboards to publish as an app so large groups of people,
both internal and external to your organization, can view them
Row Level Security

2 Select Create app to publish the app


Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content

From within a workspace, select any reports


Sensitivity Labels 1 and dashboards you want to include

*Copyright 2021, Maven Analytics, LLC


PUBLISHING APPS

Scheduled Refresh After selecting Create app, configure the setup, navigation, and permissions

Row Level Security


In the Setup tab, name the app, add
3 a description, logo, and color theme
In the Navigation tab, use the navigation builder to
Sharing Options 4 customize the order, name, and navigation width
In the Permissions tab, add
Data Lineage
5 individuals, groups, or entire
organizations to the App

Incremental
Refresh

Storage Formats

Endorse Content

Sensitivity Labels 6 Publish the app!

*Copyright 2021, Maven Analytics, LLC


PUBLISHING APPS

Scheduled Refresh After publishing the app, you’ll be provided a link for direct access

Row Level Security

Sharing Options

Menu options allow users to do things like print, chat in Teams, add
Data Lineage comments, subscribe, favorite, edit (permissions depending), etc.

Incremental
Refresh

Storage Formats

Endorse Content

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


DEPLOYMENT PIPELINES

Scheduled Refresh Deployment pipelines allow you to manage the lifecycle of your organization’s content
(ALM) by developing and testing in Power BI before it’s consumed by the end-user
Row Level Security

Sharing Options

Data Lineage

Incremental
Refresh Development Test Production

Storage Formats • First stage in Deployment Pipeline • Share with testers & reviewers • Share final version of content
• Used to design, build & upload new • Test with larger volumes of data with users across organization
content with fellow creators • See how app looks for end-users
Endorse Content

Sensitivity Labels HEY THIS IS IMPORTANT!


This concept is possible by manually creating separate workspaces, but deployment pipelines automate the process!

*Copyright 2021, Maven Analytics, LLC


DATA LINEAGE

Scheduled Refresh Data lineage refers to the flow of data from a data source to a report and dashboard

Row Level Security


Datasets Reports Dashboards
Data sources you’ve Visuals built from a Reports & tiles built
connected to single dataset from multiple datasets
Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


DATA LINEAGE VIEW

Scheduled Refresh Lineage view shows how data is linked across multiple data sources & dependencies

Row Level Security List View

Sharing Options
Lineage View

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


DATA LINEAGE TOOLS

Scheduled Refresh

Row Level Security

Sharing Options
Shows the impact analysis for the data source or Opens the report or Highlights the data lineage
dataset selected dashboard selected path based on the selection
Data Lineage

Incremental
Refresh

PRO TIP: Use the lineage path tool to help diagnose


Storage Formats errors in reports and dashboards that get data from
multiple data sources; this is especially useful when
sharing dataflows and datasets across workspaces
Endorse Content

Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


INCREMENTAL REFRESH

Scheduled Refresh Incremental Refresh is the process of reloading only the part of a dataset that may
change over time and adding it to the rest of the data set that no longer changes
Row Level Security
• Faster Refresh Times - Typically used with large datasets to decrease processing time
• More Reliable - Decreases the time connections are made to external sources
Sharing Options
• Reduced Resource Usage - Easier on the internal resources of your computer (i.e., memory)

Data Lineage

Incremental
Refresh

Storage Formats

Example 1: Macro Data (i.e. population) Example 2: Micro Data (i.e. sensor data)
Endorse Content • 20+ years of data • 3 years of data
• Daily-level data • Daily-level (hours, minutes, seconds)
• 1 Billion records • 100 Million records
Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


QUERY FOLDING

Scheduled Refresh Query folding is the ability for Power Query to generate a single query statement to
retrieve and transform source data to improve the efficiency of the Power Query engines
Row Level Security
• IMPORTANT: The whole purpose of incremental refresh is lost if a query cannot be folded

Sharing Options
Sources that support Query Folding:
• Relational Databases
Data Lineage
• Odata (SharePoint lists)
Incremental • Microsoft Exchange
Refresh • Azure Active Directory

Storage Formats
Sources that don’t support Query Folding:
• Flat files (csv, xlsx, etc.)
Endorse Content
• Azure Blob storage
• Web page data
Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


CONFIGURING INCREMENTAL REFRESH

Scheduled Refresh 1 Set RangeStart & RangeEnd parameters from the Query Editor in Power BI Desktop

Row Level Security

IMPORTANT: The Name & Type must reflect what’s shown here;
these parameters are case sensitive and are reserved by Power BI
Sharing Options specifically for incremental refresh

Data Lineage

Current Value should be a date/time value within your date/time range;


Incremental this will be overwritten when you later define Incremental refresh
Refresh

Storage Formats

Endorse Content RangeStart & RangeEnd


HEY THIS IS IMPORTANT!
parameters are added to the Current Value data type must be set to Date/Time
list of Query Editor queries
Additionally, your fact table date column data type
Sensitivity Labels must also be set to Date/Time

*Copyright 2021, Maven Analytics, LLC


CONFIGURING INCREMENTAL REFRESH

Scheduled Refresh 2 Apply RangeStart & RangeEnd parameters to a date column using a Custom Filter from the filter options

Parameters are used to filter data imported into Power BI Desktop To avoid duplicated rows, only add an “=“ sign on one side of the
Row Level Security & dynamically partition the data into ranges parameter; try using “>=“ on StartRange and “<“ on EndRange

Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

HEY THIS IS IMPORTANT!


Endorse Content
Since the date field is what determines the partial
refresh of the underlying data source, incremental
Sensitivity Labels
refresh only works with a Date/Time column

*Copyright 2021, Maven Analytics, LLC


CONFIGURING INCREMENTAL REFRESH

Scheduled Refresh 3 Define the incremental refresh policy on the dataset (right-click dataset)

Row Level Security

Sharing Options
Table incremental refresh is applied to

The number of rows you want to store


Data Lineage (think of this like “load only once and never load again”)

The number of rows you want to refresh


Incremental (think of this like “the rows I want to re-load each time”)
Refresh

Storage Formats
Detect data changes is an advanced setting that requires a separate
“LastUpdateAt” column (this isn’t the same column used to partition
Endorse Content the RangeStart & RangeEnd parameters)
HEY THIS IS IMPORTANT!
Once you publish and configure incremental
refresh in Power BI Service, you will not be able
Sensitivity Labels 4 Publish to Service for the policy to take effect to download the dataset to Power BI Desktop

*Copyright 2021, Maven Analytics, LLC


LARGE DATASET STORAGE FORMAT

Scheduled Refresh Large dataset storage format is used for datasets over the 10GB refresh limit in Service
• This is available for Premium & Embedded capacities and Premium Per User
Row Level Security

Sharing Options

Data Lineage

Incremental
Steps to enable:
Refresh
1. After creating a model in Power BI Desktop, configure incremental refresh if you expect your dataset will become larger and
progressively consume more memory
Storage Formats
2. Publish the model as a dataset to Power BI Service

3. In Power BI Service, go to Dataset > Settings > Large dataset storage format, click the slider to turn “On”, and then “Apply”
Endorse Content
4. Refresh the dataset to load historical data based on the incremental refresh policy (the first refresh could take a while to
load, but subsequent refreshes should be faster depending on your incremental refresh policy)
Sensitivity Labels

*Copyright 2021, Maven Analytics, LLC


ENDORSE CONTENT

Scheduled Refresh Endorsement is a way to flag content that’s ready for others to use
• Any content owner or member with write permissions can endorse content
Row Level Security
• It’s possible to endorse datasets, dataflows, reports, and apps

Sharing Options

Data Lineage

Incremental
Refresh

Storage Formats

Endorse Content
Certification means that the content meets the organizations quality standards and can
Sensitivity Labels
be regarded as reliable, authoritative, and ready to use across the organization

*Copyright 2021, Maven Analytics, LLC


SENSITIVITY LABELS

Scheduled Refresh Sensitivity labels in Power BI provide a simple way to classify and safeguard sensitive
content by labeling reports, dashboards, datasets, dataflows, and .pbix files
Row Level Security

Sharing Options

Data Lineage
SENSITIVITY LABEL
Hover over label to
see a description
Incremental
Refresh

Storage Formats
To apply sensitivity labels:
Endorse Content 1. You must have a Pro or Premium per User license and edit permission on the content
HEY THIS IS IMPORTANT!
2. Belong to a security group that has permission to apply sensitivity labels
Sensitivity labels do not affect access to
3. Sensitivity labels must be enabled for your organization content in Power BI Service; access is
Sensitivity Labels
4. Subscribe to Azure Information Protection solely managed by Power BI permissions

For more detail: https://docs.microsoft.com/en-us/power-bi/admin/service-security-sensitivity-label-overview *Copyright 2021, Maven Analytics, LLC


LEARN ON!
THANK YOU!

You might also like