0% found this document useful (0 votes)
26 views6 pages

Lab 4

This document outlines a lab exercise for students in a Business Intelligence and Data Analytics course, focusing on creating an interactive financial dashboard using Power BI. The lab includes steps for data preparation, writing DAX expressions, building visualizations, and formatting a report to answer key business questions regarding sales performance. The final report provides insights on profit trends, successful countries, and product investment recommendations.

Uploaded by

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

Lab 4

This document outlines a lab exercise for students in a Business Intelligence and Data Analytics course, focusing on creating an interactive financial dashboard using Power BI. The lab includes steps for data preparation, writing DAX expressions, building visualizations, and formatting a report to answer key business questions regarding sales performance. The final report provides insights on profit trends, successful countries, and product investment recommendations.

Uploaded by

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

UNIVERSITÉ DE SOUSSE

INSTITUT SUPÉRIEUR DE GESTION DE SOUSSE

Level 2 LIG
Course Business Intelligence and Data Analytics
Teacher HASSANI Asma
University Year 2024-2025

Lab 4 Financial Dashboard with PowerBI Desktop

Objective: In this lab, students will use Power Query, DAX (Data Analysis Expressions),
and Power BI visualizations to create an interactive financial dashboard.

Case study
Your manager wants to see a report on your latest sales figures. They've requested an executive
summary of:

 Which month and year had the most profit?


 Where is the company seeing the most success (by country)?
 Which product and segment should the company continue to invest in?

1. Download the sample


You can also download the sample workbook directly.

1. Download the Financial sample Excel workbook.


2. Open Power BI Desktop.
3. In the Data section of the Home ribbon, select Excel.
4. Navigate to where you saved the sample workbook, and select Open.

2. Prepare your data


In Navigator, you have the option to transform or load the data. The Navigator provides a
preview of your data so you can verify that you have the correct range of data. Numeric data
types are italicized. If you need to make changes, transform your data before loading. To make
the visualizations easier to read later, we do want to transform the data now. As you do each
transformation, you see it added to the list under Query Settings in Applied Steps

1. Select the Financials table, and choose Transform Data.


2. Select the Units Sold column. On the Transform tab, select Data Type, then select Whole
Number. Choose Replace current to change the column type.

1 BIDA_2025
Dr. Asma Hassani
The top data cleaning step users do most often is changing data types. In this case, the units
sold are in decimal form. It doesn’t make sense to have 0.2 or 0.5 of a unit sold, does it? So
let’s change that to whole number.

3. Select the Segment column. We want to make the segments easier to see in the chart later, so
let’s format the Segment column. On the Transform tab, select Format, then
select UPPERCASE.
4. Let's shorten the column name from Month Name to just Month. Double-click the Month
Name column, and rename to just Month.
5. In the Product column, select the dropdown and clear the box next to Montana.
We know the Montana product was discontinued last month, so we want to filter this data
from our report to avoid confusion.
6. You see that each transformation has been added to the list under Query Settings in Applied
Steps.

3. Write an expression in DAX


Writing measures and creating tables in the DAX formula language is super powerful for data
modeling. There's lots to learn about DAX in the Power BI documentation. For now, let's write a
basic expression and join two tables.
1. On the Home ribbon, select New measure.
2. Type this expression to add all the numbers in the Units Sold column.
DAXCopy
Total Units Sold = SUM(financials[Units Sold])
Select the check mark to commit.

Now select the Data view on the left.


On the Home ribbon, select New table.
Type this expression to generate a Calendar table of all dates between January 1, 2013, and
December 31, 2014.
DAXCopy
Calendar = CALENDAR(DATE(2013,01,01),Date(2014,12,31))
3. Select the check mark to commit.
4. Now select Model view on the left.
5. Drag the Date field from the financials table to the Date field in the Calendar table to join the
tables, and create a relationship between them.

4. Build your report

Now that you've transformed and loaded your data, it's time to create your report. In the Fields
pane on the right, you see the fields in the data model you created.
Let’s build the final report, one visual at a time.

2 BIDA_2025
Dr. Asma Hassani
Visual 1: Add a title
1. On the Insert ribbon, select Text Box. Type “Executive Summary – Finance Report”.
2. Select the text you typed. Set the font size to 20 and bold.
3. Resize the box to fit on one line.

Visual 2: Profit by Date

Now, you create a line chart to see which month and year had the highest profit.
1. From the Fields pane, drag the Profit field to a blank area on the report canvas. By default,
Power BI displays a column chart with one column, Profit.
2. Drag the Date field to the same visual. If you created a Calendar table drag the Date field
from your Calendar table instead.
Power BI updates the column chart to show profit by the two years.
3. In the Fields section of the Visualizations pane, select the drop-down in the Axis value.
Change Date from Date Hierarchy to Date.
Power BI updates the column chart to show profit for each month.
4. In the Visualizations pane, change the visualization type to Line chart.
Now you can easily see that December 2014 had the most profit

Visual 3: Profit by Country


Create a map to see which country had the highest profits.
1. From the Fields pane, drag the Country field to a blank area on your report canvas to create
a map.
2. Drag the Profit field to the map.
Power BI creates a map visual with bubbles representing the relative profit of each location.

Visual 4: Sales by Product and Segment


3 BIDA_2025
Dr. Asma Hassani
Create a bar chart to determine which companies and segments to invest in.
1. Drag the two charts you've created to be side by side in the top half of the canvas. Save some
room on the left side of the canvas.
2. Select a blank area in the lower half of your report canvas.
3. In the Fields pane, select the Sales, Product, and Segment fields.
Power BI automatically creates a clustered column chart.
4. Drag the chart so it's wide enough to fill the space under the two upper charts.
Looks like the company should continue to invest in the Paseo product and target the Small
Business and Government segments.

Visual 5: Year slicer


Slicers are a valuable tool for filtering the visuals on a report page to a specific selection. In this
case, we can create two different slicers to narrow in on performance for each month and year. One
slicer uses the date field in the original table. The other uses the date table you may have created
for "extra credit" earlier in this tutorial.

Date slicer using the original table

1. In the Fields pane, select the Date field in the Financials table. Drag it to the blank area on
the left of the canvas.
2. In the Visualizations pane, choose Slicer.
Power BI automatically creates a numeric range slicer.
3. You can drag the ends to filter, or select the arrow in the upper-right corner and change it to a
different type of slicer.

Date slicer using the DAX table


1. In the Fields pane, select the Date field in the Calendar table. Drag it to the blank area on the
left of the canvas.
2. In the Visualizations pane, choose Slicer.
3. In the Fields section of the Visualizations pane, select the drop-down in Fields. Remove
Quarter and Day so only Year and Month are left.
4. Expand each year and resize the visual, so all months are visible.
This is the slicer we'll use in the finished report.
Now if your manager asks to see just 2013 data, you can use either slicer to select years, or specific
months of each year.

Format the report


If you want to do some light formatting on this report to add more polish, here are a few easy
steps.
Theme
 On the View ribbon, change the theme to Executive.
Spruce up the visuals
Make the following changes on the Format tab in the Visualizations pane.
1. Select Visual 2. In the Title section, change Title text to “Profit by Month and Year”
and Text size to 16 pt. Toggle Shadow to On.

4 BIDA_2025
Dr. Asma Hassani
2. Select Visual 3. In the Map styles section, change Theme to Grayscale. In the Title section,
change title Text size to 16 pt. Toggle Shadow to On.
3. Select Visual 4. In the Title section, change title Text size to 16 pt. Toggle Shadow to On.
4. Select Visual 5. In the Selection controls section, toggle Show "Select all" option to On. In
the Slicer header section, increase Text size to 16 pt.

5. Finished report
Here's how your final polished report will look:

In summary, this report answers your manager’s top questions:


 Which month and year had the most profit? December 2014
 Which country is the company seeing the most success in? In Europe, specifically France
and Germany.
 Which product and segment should the company continue to invest in? The company
should continue to invest in the Paseo product and target the Small Business and
Government segments.

6. Save your report


 On the File menu, select Save.

7. Publish to the Power BI service to share

To share your report with your manager and colleagues, publish it to the Power BI service. When
you share with colleagues that have a Power BI account, they can interact with your report, but
can’t save changes.
1. In Power BI Desktop, select Publish on the Home ribbon.

5 BIDA_2025
Dr. Asma Hassani
You may need to sign in to the Power BI service.
2. Select a destination such as My workspace in the Power BI service > Select.
3. Select Open 'your-file-name' in Power BI.
Your completed report opens in the browser.
4. Select Share at the top of the report to share your report with others.

6 BIDA_2025
Dr. Asma Hassani

You might also like