0% found this document useful (0 votes)
21 views9 pages

Pbi Word Document

Uploaded by

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

Pbi Word Document

Uploaded by

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

Visualization Using Power BI

Practice Questions:
1) Combine columns “Prefix”, “First Name”, and “last Name”. Name it as “Full Name”.

Open Power BI → Transform Data → New Source →Connect to ‘Customer


Lookup’. Now click on the fields “Prefix’, ‘First Name”, and “Last Name” .
Add Column Tab → Merge Columns → Separator: Space
New Column Name: Full Name

2) Recode the column “Gender” with 0 as “Female” and 1 as “Male”.


Click on Customer Lookup table→ Table Tools → New Column
Gender_New = SWITCH('Customer
Lookup'[Gender],"0","Female","1","Male","NA","")

Here we have given double quotes for 0 and 1, because in the Gender field we have a
category “NA”, hence treated as Text.

3) Recode the column “EducationLevel” with 0,1 as “High School”, 2,3 as “Secondary
School”, and 4,5 as “Graduation”.

Change the data type from Text to Whole Number. Then do the following:
Click on Customer Lookup table→ Table Tools → New Column
EduLevel = SWITCH('Customer Lookup'[EducationLevel],0,"High
School",1,"High School",2,"Secondary
School",3,"Graduation",4,"Graduation")

4) Create columns for Start of Year, Start of Quarter, Start of Month, and Start of Week. Also
create a hierarchy of it.

Open Power BI → Transform Data → New Source →Connect to ‘Calendar Lookup’.


Now click on the filed “Date’ . Add Column Tab → Date
Date →Year → Start of Year
Date →Quarter → Start of Quarter
Date →Month → Start of Month
Date →Week → Start of Week
Click on Start of Year field → Create Hierarchy → Rename it with
appropriate name: Start Date Hierarchy.
Then click on Start of Quarter → Add to Hierarchy → Start Date
Hierarchy
Then click on Start of Month → Add to Hierarchy → Start Date
Hierarchy
Then click on Start of Week → Add to Hierarchy → Start Date
Hierarchy
5) Create a hierarchy for Continent, Country, and Region.
Click on Continent field from Territory table → Create Hierarchy → Rename it with
appropriate name: Territory Hierarchy
Then click on Country → Add to Hierarchy → Territory Hierarchy
Then click on Start of Region → Add to Hierarchy → Territory Hierarchy

6) Create columns for Year, Month, DayName.


Open Power BI → Transform Data → New Source →Connect to ‘Calendar
Lookup’. Now click on the filed “Date’ . Add Column Tab → Date

Date →Month → Month


Date →Year → Year
Date →Day → Name of Day

7) Create a column for “Quantity Type” if Order Quantity is > 1, “Multiple Items” else
“Single Item”.
Click on Sales Data → Table Tools → New Column
Quantity Type=IF('Sales Data'[OrderQuantity]>1,"Multiple
Items","Single Item")

8) Create column for Retail Price.

9) Create a column for Revenue.

10) Create a column for Customer Priority.


Change the data type TotalChildren & AnnualIncome from Any to Whole Number.
Then do the following:
Click on Customer Lookup table → Table Tools → New Column
Parent = IF('Customer Lookup'[TotalChildren]>0,"Yes", "No")
Customer Priority = IF('Customer Lookup'[Parent] = "Yes" &&
'Customer Lookup'[AnnualIncome] >100000, "Priority","Standard")

11) Create a column for Weekend Orders.


Click on Calendar Lookup table → Table Tools → New Column
Weekend=IF('Calendar Lookup'[Day Name] = "Saturday" || 'Calendar
Lookup'[Day Name] = "Sunday", "Weekend","Weekday")

12) Create measure for:


a) Total Orders, Quantity Returned, Quantity Sold
Click on Sales Data table → Table Tools → New Measure
Quantity Sold = SUM('Sales Data'[OrderQuantity])
Total Orders = DISTINCTCOUNT ('Sales Data'[OrderNumber])
Click on Returns Data table → Table Tools → New Measure
Quantity Returned = SUM('Returns Data'[ReturnQuantity])

b) Total Cost, Total Returns, Total Revenue


Click on Sales Data table → Table Tools → New Measure
Total Cost= SUMX('Sales Data', 'Sales
Data'[OrderQuantity]*RELATED( 'Product Lookup'[ProductCost]))
Total Revenue= SUMX('Sales Data', 'Sales Data'[OrderQuantity]
*RELATED('Product Lookup'[ProductPrice]))
Click on Returns Data table → Table Tools → New Measure
Total Returns = COUNT('Returns Data'[ReturnQuantity])

c) Return Rate, Total Profit

Click on Sales Data table → Table Tools → New Measure


Total Profit = [Total Revenue] - [Total Cost]
Click on Returns Data table → Table Tools → New Measure
Return Rate = DIVIDE([Quantity Returned], [Quantity Sold], "No
Sales")

d) All Orders, All Returns, % of All Orders, % of All Returns


Click on Sales Data table → Table Tools → New Measure
All Orders = CALCULATE([Total Orders],ALL('Sales Data'))
% of All Orders = DIVIDE([Total Orders],[All Orders])
Click on Returns Data table → Table Tools → New Measure
All Returns = CALCULATE([Total Returns],ALL('Returns Data'))
% of All Returns =DIVIDE([Total Returns],[All Returns])

e) Total Customers, Average Retail Price, Average Revenue per Customer


Click on Sales Data table → Table Tools → New Measure
Total Customers=DISTINCTCOUNT('Sales Data'[CustomerKey])
Average Revenue per Customer=DIVIDE([Total Revenue],[Total
Customers])
Click on Product Lookup table → Table Tools → New Measure
Average Retail Price = AVERAGE('Product lookup'[ProductPrice])
f) Bike Return Rate, Bike Returns, Bike Sales
Click on Returns Data table → Table Tools → New Measure
Bike Returns =CALCULATE([Quantity Returned],'Product Category
Lookup'[CategoryName] = "Bikes")
Bike_Return Rate =CALCULATE([Return Rate],'Product Category
Lookup'[CategoryName] = "Bikes")
Click on Sales Data table → Table Tools → New Measure
Bike Sales =CALCULATE([Quantity Sold],'Product Category
Lookup'[CategoryName] = "Bikes")

g) Previous Month Orders, Previous Month Returns, Previous Month Revenue


Click on Sales Data table → Table Tools → New Measure
Previous Month Orders = CALCULATE([Total Orders],
DATEADD('Calendar Lookup'[Date], -1, Month))
Previous Month Returns = CALCULATE ([Total Returns], DATEADD
('Calendar Lookup'[Date], -1, Month))
Previous Month Revenue = CALCULATE ([Total Revenue], DATEADD
('Calendar Lookup'[Date], -1, Month))

h) Previous Month Profit


Click on Sales Data table → Table Tools → New Measure
Previous Month Profit = CALCULATE ([Total Profit], DATEADD
('Calendar Lookup'[Date], -1, Month))

i) Order Target, Order Target Gap, Profit Target, Profit Target Gap
Click on Sales Data table → Table Tools → New Measure
Order_Target = [Previous Month Orders] * 1.1
Order Target Gap = [Total Orders] - [Order_Target]
Profit Target =[Previous Month Profit] * 1.1
Profit Target Gap = [Total Profit] - [Profit Target]

j) Revenue Target, Revenue Target Gap


Click on Sales Data table → Table Tools → New Measure
Revenue Target = [Previous Month Revenue] * 1.1
Revenue Target Gap = [Total Revenue] - [Revenue Target]
* Here I set a target 1.1 times of the previous month Orders/Profit/Revenue
If you want to bring all the measure to a Table called Measure Table, Do the following. (But
this exercise is optional)

Home Tab → Click on Enter Data Icon → Name it as Measure Table (or of your choice)
Then Select a measure (Ex: Total Orders) Change Home Table from Sales Data to
Measure Table.
13) Construct a Decomposition Tree for Total Orders by Category Name, SubcategoryName,
ProductName.
Select Decomposition Tree from Visualization Pane:
Analyze → Total Orders
Explain By → Category Name, SubcategoryName, ProductName
Format the Graph:
Format Visual →General →Title
Text → Orders by Category, Subcategory and Product Name
Font → Arial
Font Size →14
Bold
Text Color → Black
Alignment → Centre
Format Visual →Visual
Category Labels → Values
Font → Arial
Font Size →14
Bold
Font Color → Black
Values →
Font → Arial
Font Size →14
Bold
Font Color → Black
Display Units → None

14) Create cards for Total Orders, Total Returns, Total Profit, Return Rate.
Select Card from Visualization Pane:
Fields →Total Orders
Format the Graph:
Format Visual →General→ Title
Text → Orders
Font → Arial
Font Size →14
Bold
Text Color → Black
Alignment → Centre
Format Visual →General→ Effects
Background → of Your Choice
Visual Border → of Your Choice
Format Visual → Visual → Category Label → off
Format Visual → Visual → Callout Value
Font → Arial
Font Size →32
Bold
Font Color →Black
Display Units →None (You can use specific Units based the filed you are using. Ex:
Profit, you can use thousands as display units)

Copy & Paste the Card to make Cards for Total Returns, Total Profit, Return Rate.
Fields →Total Returns for Returns Card
Fields →Total Profit for Profit Card
Fields →Return Rate for Return Rate Card
Change the Title respectively.

15) Construct a line chart to show Weekly Orders, and add a tooltip for Total Orders, Total
Profit, Total Revenue, Return Rate. (Hint: Use Multi Row Card)
Select either Line Chart or Area chart from the Visualization Pane.
x- axis → Start of Week
y- axis → Total Orders
Format Visual →General→ Title
Text → Weekly Orders
Font → Arial
Font Size →14
Bold
Text Color → Black
Alignment → Centre

Now select Multi Row Card from the Visualization Pane.


Fields → Total Orders, Total Profit, Total Revenue, Return Rate
Format Visual → Visual → Callout Values
Font → Arial
Font Size →14
Bold
Color →Your Choice
Format Visual → Visual → Category Labels
Font → Arial
Font Size →14
Bold
Color →Your Choice

16) Construct a card for Unique Customers (Hint: Use the measure Total Customers) and
Revenue per Customer (Hint: Use the measure Average Revenue)

17) Construct a Donut chart for Orders by IncomeLevel, and Orders by Occupation.

18) Create a matrix to show Top 50 customers by Revenue and place the column Order
Quantity in the table. Also create cards for Top Customer by Revenue, Top Customer by
Orders, Top Customer by Revenue.

19) Construct KPI for Orders, Revenue, Return Rate, Profit.

20) Construct a Map to show Revenue by Country-Region and CategoryName

21) Construct a Tree Map for Profit by CategoryName and SubcategoryName.

22) Construct a Scroller for Revenue % Change by ProductColor.

23) Construct Animated Bar Chart for Total Profit by Country and Date.

24) Construct a water fall chart with suitable fields.


25) Construct a ribbon chart with suitable field.

26) Construct a scatter plot with suitable fields. Also add animation for it.

27) Construct a bubble chart with suitable fields.

28) Construct a stacked bat chart with suitable fields. Add a slicer on it.

29) Create a report for Sales.


30) Create a report for Revenue.
31) Create a report for Returns.
32) Create a dashboard.

You might also like