You are on page 1of 47

Module 4:

DATA VISUALIZATION
Instructor: MA. Nguyen Phat Dat

Ho Chi Minh, October 13th -14th & 20th -21th,2021


Data Aalytics and Data Privacy Course

MODULE 4

1. Review module 3
2. Understand Power BI (Visualization)
3. DAX Calculations
4. Types of charts and dashboard sample
5. Data visualization
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

DAX OPERATORS

Comparison operator Meaning Example


= Equal to [Region] = "USA"
== Strict equal to [Region] == "USA"
> Greater than [Sales Date] > "Jan 2009"
< Less than [Sales Date] < "Jan 1 2009"
>= Greater than or equal to [Amount] >= 20000
<= Less than or equal to [Amount] <= 100
<> Not equal to [Region] <> "USA"

Arithmetic operator Meaning Example


+ (plus sign) Addition 3+3
– (minus sign) Subtraction or sign 3–1–1
* (asterisk) Multiplication 3*3
/ (forward slash) Division 3/3
^ (caret) Exponentiation 16^4 Source: https://docs.microsoft.com/en-us/dax/dax-operator-reference
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

DAX FUNCTION CATEGORIES

Aggregation & Stats Logical Text Filter Date & Time

Aggregation functions Logical functions act DAX includes a set of The filter and value These functions help
calculate a (scalar) upon an expression to text functions based functions in DAX are you create
value such as count, return information on the library of string some of the most calculations based
sum, average, about the values or functions in Excel, but complex and on dates and time.
minimum, or maximum sets in the expression. which have been powerful, and differ Many of the functions
for all rows in a column modified to work with greatly from Excel in DAX are similar to
or table as defined by tables and columns in functions. the Excel date and
the expression. tabular models time functions

Common examples: Common examples: Common examples: Common examples: Common examples:
 SUM  AND ( && )  CONCATENATE  ALL  DATE/DATEDIFF
 AVG  OR ( || )  FORMAT  ALLEXCEPT  TODAY/NOW
 MIN/MAX  IF  LEN  CALCULATE  YEAR/MONTH/DAY
 COUNT  TRUE/FALSE  RIGHT/MID/LEFT  FILTER  CALENDAR
 DISTINCTCOUNT  NOT  FIND/SUBTITUTE

Source: https://docs.microsoft.com/en-us/dax/dax-function-reference
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

DAX FUNCTION

Practice Aggreration & Stats Functions:


- What are the total sales?
- What is the total quantity sold?
- What is the total number of orders sold?
- What are the average sales per order?
- What were the total sales last year?
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

DAX FUNCTION

Practice Text Functions: Use “Dim_Customer” table, create Full_Name column


by DAX, includes “Firsr_Name, “Last_Name”, “Middle_Name”, “Gender”
Ex: Mr. Nguyen Van A
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

DAX FUNCTION

Practice Filter Functions:


- What were the total sales of Bikes Category in 2013 (using CALCULATE )
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

DAX FUNCTION

Practice Time Functions: Use “Fact_Internet_Sales” table, create Date_Time table by


DAX (based on “Order_Date” column) (suggest: CALENDAR function)
Data Aalytics and Data Privacy Course

MODULE 4

1. Review module 3
2. Concept of Power BI
3. DAX Calculations
4. Types of charts and dashboard sample
5. Data visualization
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

7. Types of Charts
Team works:
- What kinds of charts?
- Which types of charts can we include them into
a group ?
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Single Value Single Line Multiples Line Scatter Plot Tree-map Box Plot Filled Map

100M
Sale Volume Sale Volume

Symbol Map
Table Bar Chart Group Bar Bubble Chart Pie Chart Scatter Plot
Chart

Highlight Group Bar Bullet Chart Word Cloud Donut Chart Histogram
Table Chart

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Show the raw number prominently displayed

Best practices
 Make the values big enough to catch
Single Value attention and stand out.
 If you’re using multiple single value items
in your dashboard, it’s important to keep

100M the font size and type consistent.


 Proper placement on a dashboard is
important to make sure that the audience
finds it quickly.
Sales Amount
Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Show the exact values and compare pairs of related values

Best practices
Table  Arrange time-based data horizontally
across in separate columns.
 Design both the layout and the labeling
simply, attention the substantive points
 Columns should be evenly spaced and not
too far apart. The table should only be as
wide as the data content requires.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Show the exact values and use color to convey relative magnitude

Highlight Table Best practices


 Color is a core component of this type of
table. Choose an appropriate color palette
to match the data.
 It is common to use a sequential color;
where lighter colors correspond to smaller
values and darker colors to larger values.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Display trends over a period of time for a single category

Best practices
Single Line  Select the right interval for your data; you
need to find the right balance by relying on
your domain knowledge of the data.
 In most cases, the y axis will start at zero,
if it doesn’t, you’ll need to clearly
demonstrate this to avoid confusing your
audience.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Display trends over a period of time for multiple categories

Best practices
Multiples Line  Avoid comparing more than 5 lines in your
chart.
 Use color to help differentiate the various
lines in the view.
 Avoid using sequential colors to minimize
confusion. Using colors that are distinct
from each other is best.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows comparisons among discrete categories


Best practices
 Sort your data either from greatest to smallest or
Bar Chart the other way around -to help your audience spot
the differences.
 Avoiding using different colors for each bar as it
will confuse your audience.
 Use a horizontal bar chart for displaying many
categories or if you’re using lengthy data labels.
 Maintain a zero baseline.
 Ensure there is enough space between the bars.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows comparisons among discrete categories and sub-categories

Best practices
Group Bar Chart
 Be careful about not showing too much
information which can result in a complicated
visualization.
 Effective use of color to distinguish the
categories.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows comparisons among discrete categories and sub-categories

Best practices
Stacked Bar  Only use 2-3 categories per group otherwise
it’ll become difficult to.
Chart  If you have negative values, you should
avoid this chart.
 Effective use of color to distinguish the
categories.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Compares data against historical performance or pre-assigned thresholds

Bullet Chart Best practices


 Use contrasting colors to highlight how the
data is progressing.
 Use one color in different shades to gauge
progress.
 Remove anything that isn’t adding
information: borders, gridlines,…

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows the relationship between two variables

Best practices
Scatter Plot  Use the marks, color can really help in
marking your scatter plots stand out.
 Independent variables need to be placed
on the x-axis and dependent variables on
the y axis.
 Consider including a trend line to define
the correlation

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows relational value without regards to axis

Best practices
Bubble Chart  Use this chart grab attention and engage
your audience.
 Use text labels and colors to make the
chart more effective
 Consider using bubbles as a navigation
element to filter data in an interactive
dashboard view

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows the relative frequency of words in our data

Best practices
Word Cloud  Avoid using fancy font types and use color
sparingly.
 Remove common words like “the”, “and”,
etc..
 Word clouds do not provide a clear
differentiation between words of similar
sizes, unlike a bar chart.
Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows a hierarchical part-to-whole relationship

Best practices
Pie Chart  Limit the number of categories to 4-5.
 Use colors to make your most important
value stand out .
Avoid 3D pie charts because they can
distort the perception of the data.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows a part-to-whole relationship

Donut Chart Best practices


 Well-formatted and informative labels are
essential because the information
conveyed by circular shapes alone is not
enough and is imprecise.
 It is a good practice to sort the slices,
which makes a donut chart clearer for
comparison.
Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows a hierarchical part-to-whole relationship

Best practices
Tree-map  Use labels sparingly, only show labels on
the boxes that are big.
 Consider including borders in the Treemap
can help view each of the rectangles more
clearly.
 Size of the boxes should be a quantity
measure.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows the relationship between two variables

Best practices
Scatter Plot  Use the marks, color can really help in
marking your scatter plots stand out.
 Independent variables need to be placed
on the x-axis and dependent variables on
the y axis.
 Consider including a trend line to define
the correlation.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Displays the data distribution through quartiles

Box Plot Best practices


 Experiment with the use of color to tell the
story.
 If the groups plotted in a box plot do not
have an inherent order, then you should
consider arranging them in an order that
highlights patterns and insights.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Show the underlying shape of a set of continuous data

Best practices
Histogram  Plot with a zero-valued baseline; since the
frequency of data in each bin is implied by
the height of each bar, changing the
baseline or introducing a gap in the scale
will skew the perception of the
distribution of data.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows geographic data using shading on a country or state basis to indicate relationships

Filled Map Best practices


 Reduce any background layers that might
be distracting from the data story. Only
include the necessary data labels.
 Use borders to provide further
differentiation between states or Countries.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Specific Value Comparison Relationship Composition Distribution Geographic

Shows geographic data using a symbol plotted over a longitude and latitude

Symbol Map
Best practices
 Consider changing the opacity of the
marks to allow for viewing of the
overlapped marks.
 Play with the size of the marks to ensure
clear visibility.

Source: datacatedacademy
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising


DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising

Source: Linkpack
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising

Source: Linkpack
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising


DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising


DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising


DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising

Source: Internet.
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising

Source: Phương, N. T. T., & Thành, H. T. (2020).


DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising

Source: Internet
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Procurement Fulfillment Production Finance Advertising

Source: Internet
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

How to create a
good
dashboard?

Source: Tableau Course


DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Lines

How many different lines can I put in one chart?

Does the y-axis of a line graph have to start at zero?

Source: storytellingwithdata
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Bars

Adjust the gap between bars Intentionally order bars

Use a zero-baseline Consider a legend

Source: storytellingwithdata
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Pie

Avoid: 3D

Source: storytellingwithdata
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Pie

Avoid: 3D

Source: storytellingwithdata
DATA ANALYTICS AND DATA PRIVACY TRAINING COURSE

Table

Remove unnecessary borders and shading

Source: storytellingwithdata

You might also like