0% found this document useful (0 votes)
69 views66 pages

PBI Desktop Fundamentals Training Session 2

This document outlines an upcoming Power BI Desktop training consisting of two sessions. The first session will cover downloading and installing Power BI Desktop, connecting to and transforming data sources, and building a relational data model. The second session will cover analyzing data using DAX measures and calculated columns, and creating interactive reports and dashboards. The training will teach participants how to connect and transform raw data, build a relational data model, and create calculated fields and measures to design an interactive report that analyzes and visualizes the data.

Uploaded by

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

PBI Desktop Fundamentals Training Session 2

This document outlines an upcoming Power BI Desktop training consisting of two sessions. The first session will cover downloading and installing Power BI Desktop, connecting to and transforming data sources, and building a relational data model. The second session will cover analyzing data using DAX measures and calculated columns, and creating interactive reports and dashboards. The training will teach participants how to connect and transform raw data, build a relational data model, and create calculated fields and measures to design an interactive report that analyzes and visualizes the data.

Uploaded by

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

OPCO SC DIGITAL

POWER BI DESKTOP TRAINING

1
TRAINING STRUCTURE

Session 01: Thursday, 26/08/2021


 Download & Install, Introduction about Power BI Desktop
 Connect, transform data from sources
 Build relational data model

Session 02: Friday, 27/08/2021


 Analyze data with DAX measures, calculated columns
 Create, design interactive reports and dashboards

Use Power BI Desktop to:


• Connect and transform the raw data
OBJECTIVES • Build a relational data model
• Create new calculated columns and DAX measures
• Design an interactive report to analyze and visualize the data
CALCULATED FIELDS WITH DAX
MEET
DAX
Data Analysis Expressions, commonly known as DAX, is the formula language that drives
Power BI. With DAX, you can:
• Add calculated columns and measures to your model, using intuitive syntax
• Go beyond the capabilities of traditional “grid-style” formulas, with powerful and flexible
functions
built specifically to work with relational data models

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


CALCULATED COLUMNS

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


 Calculated columns refer to entire tables or columns TIP:
As a rule of thumb, use calculated
 Calculated columns generate values for each row, columns when you want to “stamp”
which are visible within tables in the Data view static, fixed values to each row in a
table

 Calculated columns understand row context; they’re DO NOT use calculated columns for
great for defining properties based on information in aggregation formulas, or to
each row, but generally useless for aggregation (SUM, calculate fields for the “Values”
COUNT, etc) area of a visualization (use
measures instead)
CALCULATED COLUMNS
(EXAMPLES)
In this case we’ve added a calculated column named
“Parent”, which equals “Yes” if the [TotalChildren] field
is greater than 0, and “No” otherwise (just like Excel!)
• Since calculated columns understand row context, a
new value is calculated in each row based on the
value in the [TotalChildren] column
• This is a valid use of calculated columns; it creates a
new row “property” that we can now use to filter or
segment any related data within the model

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


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

Measures are DAX formulas used to generate new calculated values


• Like calculated columns, measures reference entire tables or
columns

• Unlike calculated columns, measure values aren’t visible within TIP:


As a rule of thumb, use measures
tables; they can only be “seen” within a visualization like a (vs. calculated columns) when a
chart or matrix (similar to a calculated field in an Excel pivot) single row can’t give you the
answer (in other words, when you
• Measures are evaluated based on filter context, which means need to aggregate)
they recalculate when the fields or filters around them change
(like when new row or column labels are pulled into a matrix or
when new filters are applied to a report)
RECAP: CALCULATED COLUMNS VS.
MEASURES
CALCULATED COLUMNS
MEASURES
• Values are calculated based on information from each Values are calculated based on information from any
• filters in the report (has filter context)
row of a table (has row context)
Does not create new data in the tables themselves
• Appends static values to each row in a table and (doesn’t increase file size)

stores them in the model (which increases file size) Recalculate in response to any change to filters within
the report
• Recalculate on data source refresh or when changes
• Almost always used within the values field of a visual
are made to component columns
• Primarily used as rows, columns, slicers or filters

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


ADDING COLUMNS & MEASURES
Option 1: Select “New Measure” or Option 2: Right-click within the table (in the Data view)
“New Column” from the Home tab or the Field List (in either the Data or Report view)

When you insert Columns or Measures using the Home tab


(Option 1), they are assigned to whichever table is currently
selected, or the first table in the field list by default
• Measures can be reassigned to new “Home” tables (under the
“Structure” options in the contextual Measure Tools tab), but
Option 2 allows you to be more deliberate about placing them

• NOTE: Assigning measures to specific tables doesn’t have ANY


impact on functionality – it’s just a way to keep them organized
QUICK MEASURES

Quick Measures are pre-built formula


templates that allow you to drag and drop
fields, rather than write DAX from scratch

While these tools can be helpful for defining


more complex measures (like weighted
averages or time intelligence formulas),
they don’t help you understand the
fundamentals of DAX
IMPLICIT VS. EXPLICIT MEASURES

Implicit measures are created when you drag raw numerical fields
(like “OrderQuantity”) into the values pane of a visual and manually
select the aggregation mode (Sum, Average, Min/Max, etc)

Explicit measures are created by actually entering DAX functions


(or
adding “quick measures”) to define calculated columns or measures

TIP:
Implicit measures are only accessible within the specific visualization
in which it was created, and cannot be referenced elsewhere
Explicit measures can be used anywhere in the report, and
referenced
within other DAX calculations to create “measure trees”
Example of an implicit measure
Practice: IMPLICIT VS. EXPLICIT MEASURES
 Try two ways to create an
Explicit Measure using DAX

 Compare and differentiate


Implicit vs Explicit
Measures
UNDERSTANDING FILTER CONTEXT

Remember that measures are evaluated based on filter context, which means that they
recalculate whenever the fields or filters around them change
For this particular value in the matrix, the Total Orders measure is calculated based on the
following filter context: Products[ProductName] = “Touring Tire Tube”
This allows the measure to return the total order quantity for each product specifically (or
whatever the row and column labels dictate – years, countries, product categories,
customer names…)
This Total is not calculated by summing the values above; it evaluates as its own measure,
with no filter context (since we aren’t calculating orders for a specific product)
TIP:
Each measure value in a report is like an island, and calculates according to it’s own filter
context (even Totals and Grand Totals)
FILTER CONTEXT
MEASURE: Total Revenue
(EXAMPLES)
MEASURE: Total Orders MEASURE: Total Orders
FILTER CONTEXT: FILTER CONTEXT:
FILTER CONTEXT:
Calendar[Year] = 2016 or 2017 Calendar[Year] = 2016 or 2017
Customers[Gender] = F (Female) Calendar[Year] = 2016 or 2017
Customers[Full Name] = Mr. Larry Munoz
Customers[Occupation] = Clerical

This is a page-level
filter, which impact
ALL visuals on the
report page

MEASURE: Total Orders MEASURE: Total Orders


MEASURE: Total Revenue
FILTER CONTEXT: Calendar[Year] = 2016 or 2017
FILTER CONTEXT:
Calendar[Month] = August 2016 FILTER CONTEXT:
Calendar[Year] = 2016 or 2017
Calendar[Year] = 2016 or 2017
STEP-BY-STEP MEASURE
CALCULATION
How is this measure calculated?
This all happens instantly behind the scenes, every time the filter context changes

STEP 1 STEP 2 STEP 3


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

Product Table

Accessories

Product[CategoryName] = “Accessories”
= 1,115
Count of rows in the AW_Returns_Data
Product Table table, filtered down to only rows where
11 the product category is “Accessories”
Accessories
AW_Returns_Data
*
* Accessories
AW_Sales_Data

Accessories
Practice: Filter Contexts
 Add a page level filter
context – Year 2016 2017,
observe the different
changes it applies to every
visuals

 Click on Categories in a
visual to see how it filters
the other visual accordingly
COMMON DAX FUNCTIONS
DAX SYNTAX
MEASURE NAME
Referenced Referenced
• Note: Measures are always surrounded
in brackets (i.e. [Total Quantity]) when TABLE NAME COLUMN NAME
referenced in formulas, so spaces are OK

Total Quantity: =SUM(Transactions[quantity])


Note: This is a “fully qualified” column, since it’s preceeded by the table
FUNCTION NAME name -- table names with spaces must be surrounded by single quotes:
Calculated columns don’t always use functions, but measures do: • Without a space: Transactions[quantity]
 In a Calculated Column, =Transactions[quantity] returns the • With a space: ‘Transactions Table’[quantity]
value from the quantity column in each 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 translate that as a single TIP:
value (you need some sort of aggregation) For column references, use the fully qualified name (i.e. Table[Column])
For measure references, just use the measure name (i.e. [Measure])
DAX
OPERATORS
Arithmetic Comparison
Operator Meaning Example Operator Meaning Example

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

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

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

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

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

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

Text/Logical Operator Meaning Example

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

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

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

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

MATH & STATS LOGICAL TEXT FILTER DATE & TIME


Functions Functions Functions Functions Functions
Basic aggregation Functions for returning Functions to manipulate Lookup functions based Basic date and time
functions as well as information about values text strings or control on related tables and functions as well as
“iterators” evaluated at in a given conditional formats for dates, times filtering functions for advanced time
the row-level expression or numbers dynamic calculations intelligence operations

Common Examples: Common Examples: Common Examples: Common Examples: Common Examples:
• SUM • IF • CONCATENATE • CALCULATE • DATEDIFF
• AVERAGE • IFERROR • FORMAT • FILTER • YEARFRAC
• MAX/MIN • AND • LEFT/MID/RIGHT • ALL • YEAR/MONTH/DAY
• DIVIDE • OR • UPPER/LOWER • ALLEXCEPT • HOUR/MINUTE/SECOND
• COUNT/COUNTA • NOT • PROPER • RELATED • TODAY/NOW
• COUNTROWS • SWITCH • LEN • RELATEDTABLE • WEEKDAY/WEEKNUM
• DISTINCTCOUNT • TRUE • SEARCH/FIND • DISTINCT
• FALSE • REPLACE • VALUES Time Intelligence Functions:
Iterator Functions: • REPT • EARLIER/EARLIEST • DATESYTD
• SUBSTITUTE • HASONEVALUE • DATESQTD
• SUMX
• TRIM • HASONEFILTER • DATESMTD
• AVERAGEX
• UNICHAR • ISFILTERED • DATEADD
• MAXX/MINX
• USERELATIONSHIP • DATESINPERIOD
• RANKX
• COUNTX
BASIC DATE & TIME FUNCTIONS

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


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

YEAR() YEAR(Date)
HOUR/MINUTE/ Returns the hour (0-23), minute (0-59), or
second (0-59) of a given datetime value =HOUR/MINUTE/SECOND(Datetime)
SECOND()

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

WEEKDAY/ Returns a weekday number from 1 (Sunday)


to 7 (Saturday), or the week # of the year =WEEKDAY/WEEKNUM(Date, [ReturnType])
WEEKNUM()
Returns the date of the last day of the
EOMONTH() month, +/- a specified number of months =EOMONTH(StartDate, Months)

Returns the difference between two dates,


DATEDIFF( based on a selected interval =DATEDIFF(Date1, Date2, Interval)
)
Practice: Date Time Functions
 Try different Date , Time
functions to create new
columns for Calendar table
BASIC LOGICAL FUNCTIONS (IF/AND/OR)

Checks if a given condition is met, and


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

Evaluates an expression and returns a


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

Checks whether both arguments are TRUE,


AND() and returns TRUE if both arguments are =AND(Logical1, Logical2) Note: Use the && and
TRUE, otherwise returns FALSE
|| operators if you want
to include more than two
Checks whether one of the arguments is conditions
OR() TRUE to return TRUE, and returns FALSE if =OR(Logical1, Logical2)
both arguments are FALSE
Practice: Logical Functions

 Try IF and OR functions to


create new columns for
Customer and Calendar
tables
TEXT FUNCTIONS
Note: Use the & operator as a shortcut,
LEN() Returns the number of characters in a string =LEN(Text or to combine more than two strings!

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

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


MID/ start/middle/end of a text string
=MID(Text, StartPosition, NumChars)
RIGHT()
UPPER/LOWER/ Converts letters in a string to
PROPER() upper/lower/proper case =UPPER/LOWER/PROPER(Text)

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


SUBSTITUTE() new text in a string
[InstanceNumber])

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


SEARCH() or character is found, reading left to right
[StartPosition], [NotFoundValue])
Practice: Text Functions

 Try different Text functions


to Concatenate, Substitute
and Search to create new
columns in Customer table
RELATED

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

=RELATED(ColumnName) TIP:
RELATED works almost exactly like a VLOOKUP function – it uses
the relationship between tables (defined by primary and foreign
keys) to pull values from one table into a new column of another
The column that contains the
values you want to retrieve Since this function requires row context, it can only be used as a
calculated column or as part of an iterator function that cycles
Examples: through all rows in a table (FILTER, SUMX, MAXX, etc)
• Product_Lookup[ProductName] Avoid using RELATED to create redundant calculated columns
• Territory_Lookup[Country] unless you absolutely need them, since those extra columns
increase file size; instead, use RELATED within a measure like
FILTER or SUMX
Practice: Related()
 Use Related() function to
bring new column data from
another table to Sales table
(Product Price)

 Use the new column to


calculate Revenue column
BASIC MATH & STATS FUNCTIONS

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

Returns the average (arithmetic


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

Returns the largest value in a column


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

Returns the smallest value in a column


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

Performs division and returns the


DIVIDE() alternate result (or blank) if
=DIVIDE(Numerator, Denominator, [AlternateResult])
div/0
Practice: Basic Math Stats Functions
 Calculate new Measures
for Sales, Returns and
Product tables using Math
Stats functions
COUNT, COUNTA, DISTINCTCOUNT & COUNTROWS

Counts the number of cells in a column that


COUNT() contain numbers
=COUNT(ColumnName)

Counts the number of non-empty cells in a


COUNTA( column (numerical and non-numerical)
=COUNTA(ColumnName)
)
Counts the number of distinct or unique
DISTINCTCOUNT() values in a column
=DISTINCTCOUNT(ColumnName)

Counts the number of rows in the specified


COUNTROWS() table, or a table defined by an expression
=COUNTROWS(Table)
Practice: Count functions

 Use Count functions to


create Total Returns and
Total Orders based on rows
and distinct rows of
Returns and Sales tables
CALCULATE

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

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

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
Examples:
create filters based on measures)
• [Total Orders] Examples:
• SUM(Returns_Data[ReturnQuantity]) • Territory_Lookup[Country] = “USA”
• Calendar[Year] > 1998

TIP:
CALCULATE works just like SUMIF or COUNTIF in Excel, except it can evaluate measures based on ANY
sort of calculation (not just a sum, count…)
CALCULATE
(EXAMPLE)

Here we’ve defined a new measure named “Bike Returns”, which


evaluates the “Total Returns” measure when the CategoryName
in the Products table equals “Bikes”

Wait, why do we see the same repeating values when


we view a matrix with different categories on rows? TIP:
CALCULATE modifies and overrules any competing filter context!
Shouldn’t these cells have different filter contexts for
In this example, the “Clothing” row has filter context of
Accessories, Clothing, Components, etc?
CategoryName = “Clothing” (defined by the row label) and
CategoryName= “Bikes” (defined by the CALCULATE function)
Both cannot be true at the same time, so the “Clothing” filter is
overwritten and the “Bikes” filter (from CALCULATE) takes priority
Practice: Calculate()

 Use Calculate() to create


conditional new Measures
for Sales, Returns and
Calendar tables
AL
L
ALL() Returns all rows in a table, or all values in a column, ignoring any filters that have been applied

=ALL(Table or ColumnName, [ColumnName1], [ColumnName2],…)


The table or column that you List of columns that you want to clear filters on (optional)
want to clear filters on Notes:
Examples: • If your first parameter is a table, you can’t specify additional columns
• Transactions • All columns must include the table name, and come from the same table
• Products[ProductCategory] Examples:
• Customer_Lookup[CustomerCity], Customer_Lookup[CustomerCountry]
• Products[ProductName]

TIP:
Instead of adding filter context, ALL removes it. This is often used 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)
Practice: All()
 Use ALL() function to create
ALL orders, use that to
calculate % of ALL orders;
and Avg Retail Price for
Sales and Product tables
FILTE
R
FILTER() Returns a table that represents a subset of another table or expression

=FILTER(Table, FilterExpression) TIP:


FILTER is used to add new filter context, and can
handle more complex filter expressions than
CALCULATE (by referencing measures, for
Table to be filtered A Boolean (True/False) filter expression example)
Examples:
to be evaluated for each row of the table Since FILTER returns an entire table, it’s almost
• Territory_Lookup Examples: always used as an input to other functions, like
• Customer_Lookup • Territory_Lookup[Country] = “USA” CALCULATE or SUMX
• Calendar[Year] = 1998 Since FILTER iterates through each row in a
• Products[Price] > [Overall Avg Price] table, it can be slow and processor-intensive;
don’t use FILTER if a CALCULATE function will
accomplish the same thing
Practice: Filter()

 Use Filter() function to


calculate the conditional
High Orders measure for
Sales table with Price > Avg
Retail Price
ITERATOR (“X”) FUNCTIONS
Iterator (or “X”) functions allow you to loop through the same calculation or expression on
each row of a table, and then apply some sort of aggregation to the results (SUM, MAX, etc)

=SUMX(Table, Expression)
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
Examples: Examples: Examples:
• SUMX • Sales • [Total Orders]
• COUNTX • FILTER(Sales, • Sales[RetailPrice] * Sales[Quantity]
• AVERAGEX RELATED(Products[Category])=“Clothing”)
• RANKX
• MAXX/MINX

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 (like SUMPRODUCT)
Practice: …X() functions
 Try calculating Total revenue
with Sum and Sumx to
understand the difference

 Incorporate Related() function


into Sumx to reduce model load
(by deleting RetailPrice and
Revenue columns in Sales table)
TIME INTELLIGENCE FORMULAS

Time Intelligence functions allow you to easily calculate common time comparisons:

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


To-Date Use DATESQTD for Quarters or DATESMTD for Months

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


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

TIP:
To calculate a moving average, use the running total calculation above and divide by the number of intervals
Practice: Date Time functions
 Create a Matrix visual

 Grab Total Revenue as Values and


Start of month as Rows into the
Matrix visual

 Use DATESYTD function to create


YTD Revenue measure

 Grab YTD Revenue measure into the


Matrix visual as values

 Use Format – Conditional formatting


to add Data bars format to YTD
Revenue
Practice: Date Time functions
 Use DATEADD function to create
Previous Month Revenue Measure

 Calculate Revenue Target Measure by


multiplying Previous Month Revenue by
1.1 (10% increase)

 Grab Revenue Target into the Matrix


visual as values
Practice: Date Time functions
 Use DATESINPERIOD function
to calculate 10 Day Rolling
Revenue

 Grab the 10 Day Rolling


Revenue Measure into the
Matrix visual as values
BEST PRACTICES: CALCULATED COLUMNS &
MEASURES
Don’t use a calculated column when a measure will do the trick
 Only use calculated columns to “stamp” static, fixed values to each row in a table
 Use measures when aggregation is necessary, or to create dynamic values in a report

Write measures for even the simplest calculations (i.e. Sum of Sales)
 Once you create a measure it can be used anywhere in the report and as an input to other, more complex
calculations (no implicit measures!)

Break measures down into simple, component parts


 DAX is a difficult language to master; focus on practicing and understanding simple components at first,
then assemble them into more advanced formulas

Reference columns with the table name, and measures alone


 Using “fully qualified” column references (preceeded by the table name) helps make formulas more
readable and intuitive, and differentiates them from measure references
BUILDING REPORTS - VISUALS
THE POWER BI REPORT VIEW
View Options (Themes, Layouts, Gridlines, Filter/Bookmarks/Selection Panes, etc) Visualization Options (Charts, Slicers, Maps, Matrices, etc)

Field List (Tables, Columns, Measures)

Fields/Format/Analytics Pane
(Visual-specific configuration &
formatting tools)

Drill through Filters (Options for


page-level drill through filters)

Report Pages (Similar to Excel tabs; each is a blank reporting canvas) Filters Pane (Visual-Level, Page-Level, and Report-Level Filters)
INSERTING OBJECTS & BASIC CHARTS

Click on a visualization type or use the “New Visual”


option in the Home tab to insert a blank chart template
(usually a column chart by default)
Note: You can also add new visuals, along with Pages, Buttons,
Images, and more from the Insert tab

Drag fields or measures directly into the report


canvas to automatically generate a new visual
Practice: Report View
 Use Insert tab to insert basic
image/shape into the report page

 Try Gridlines/Snap to grid/Lock objects


functions
FORMATTING OPTIONS
Line & Column Chart Matrix Donut Chart
Practice: Formatting Options
 Add a Stacked bar chart visual

 Grab in Total Orders as Values

 Grab in SubCategoryName from Product


Subcategories table into Axis of the visual
to divide Total Orders into Subcategories

 Add Total Revenue to the Tooltips and


hover over visual to check the tooltip data
Practice: Formatting Options

 Check the Format tab of the Matrix visual

 Try editing the Data colors – click the fx


symbol to enter advanced formatting, set
color scale and fields
FILTERING OPTIONS
There are four (x4) primary filter types in Power BI reports:
1. Visual Level: Applies only to the specific visual in which it is defined
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
4. Drill through: Applies to specific pages, and updates based on the item clicked

Filter settings include Basic, Advanced, and Top N options

Basic Options
Top N Options Advanced (Values)

Advanced (Text)
Practice: Filtering Options
 Create similar Matrix with
CategoryName in the Axis of the
visual instead

 Try clicking on each Category of the


new visual to filter the
Subcategories Matrix visual
accordingly

 Open Filters panel, grab in


CategoryName and try Basic
filtering (Bikes only) or Top N
filtering (Top 2 by Total Orders)
Practice: Matrix visuals
 Create a new Matrix visual with Rows as
ProductName

 Values as Total Orders and Return Rate


(Quantity Returned/Quantity Sold)

 Use Format tab – Conditional


formatting to create Data bars visual
for Total Orders column, format cells
using Advanced controls options
Practice: Matrix visuals
 Again, use Conditional formatting to create
Background color for Return rate column,
click Advanced controls for more formatting
options

 Note that for Return Rate, Lower is better, so


edit the colors accordingly
Practice: Date Slicer
 Add a Slicer visual to the report

 Grab in Date from Calendar


table as Field

 Click the arrow down on upper


right corner of the slicer visual
to choose options for Date slicer

 Date Time filtering can also be


done through Filters panel
Practice: Card & KPIs
 Add a Card and Multi row card
visuals to the report

 Try putting in values for the Card


visuals
 Add a KPI visual to the
report

 Add Indicator as Total


Revenue, Axis as Start
of Month (from
Calendar), Target goals
as Prev Month Revenue
Practice: Maps
 Add a Slicer and Map
visuals to the report

 Combine them to create


filter by Continents and
display of Total Orders by
Countries
Practice: Line & Area Charts
 Add Area chart visual to the
report

 Grab in Start of month to the


Axis to display data points by
month

 Grab Total Returns into Values

 Do similar for Total Profit, then


switch to Line chart

 Edit data colors by Format tab


– Data colors
Practice: Trend line & Forecast
 Use Data analytics tab for the
Line chart
 Add Trend line and Forecast
area as formatted

 Note that
Trend line
requires X axis
of the Line
chart visual to
be Continuous
data to apply
EDITING REPORT INTERACTIONS

Report interactions allow you to determine how filters applied to one visual impact the others
 For example, by selecting the Timeline visual and enabling “Edit interactions” from the Format tab, we can manually determine which visuals should
“react” when the date range changes
 In this case the Product matrix, Country slicer and Map will filter in response to timeline changes ( ), but the MTD, QTD, and YTD Profit cards
will not ( )
IMPORTING CUSTOM VISUALS

Click the ellipsis in the visuals pane to import custom visuals


from files or from the Power BI Marketplace, directly into the
report
BEST PRACTICES: DATA
VISUALIZATION
Strive for clarity & simplicity, above all else
 Aim to maximize impact and minimize noise; it’s all about balancing design and function
Don’t just build charts and graphs; create a narrative
 Without context, data is meaningless; use filters, bookmarks, and effective visualizations to translate
raw data into powerful insights and implications
Always ask yourself the three key questions:
1. What type of data are you visualizing? (Integer, categorical, time-series, geo-spatial, etc)
2. What are you trying to communicate? (Relationships, compositions, trending, etc)
3. Who is the end user consuming this information? (Analyst, CEO, client, intern, etc)
THANK YOU!

You might also like