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

Lab Manual BA

business analytics

Uploaded by

eeswarjai032
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)
19 views66 pages

Lab Manual BA

business analytics

Uploaded by

eeswarjai032
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/ 66

Lab Manual

CCW331 Business Analytics


List of Experiments
I Cycle – Ms Excel

1. Explore the features of Ms-Excel.


2. a)Get the input from user and perform numerical operations
(MAX, MIN, AVG, SUM, SQRT, ROUND)
b)Perform data import/export operations for different file formats.
3. Perform statistical operations – Mean, Median, Mode and Standard deviation, Variance,
Skewness, Kurtosis
4. Perform Z-test, T-test & ANOVA
5. Perform data pre-processing operations i) Handling Missing data ii) Normalization
6. Perform dimensionality reduction operation using PCA, KPCA & SVD
7. Perform bivariate and multivariate analysis on the dataset.
8. Apply and explore various plotting functions on the data set.

II Cycle – Power BI Desktop

1. Explore the features of Power BI Desktop


2. Prepare & Load data
3. Develop the data model
4. Perform DAX calculations
5. Design a report
6. Create a dashboard and perform data analysis
7. Presentation of a case study

2
EX: 1 EXPLORE THE FEATURES OF MS-EXCEL.

Aim: To Explore the features of Ms-Excel.

Procedure:
Microsoft Excel is a powerful spreadsheet application that offers a wide range of features for data
analysis, visualization, and management. Here is an exploration of some key features of Excel:

Basic Features

1. Workbook and Worksheets


- Workbook: The entire Excel file containing multiple worksheets.
- Worksheet: Individual sheets within a workbook, each containing its own grid of cells.

2. Cells, Rows, and Columns


- Cells: The basic unit of Excel where data is entered.
- Rows: Horizontal lines of cells, identified by numbers.
- Columns: Vertical lines of cells, identified by letters.

3. Data Entry and Formatting


- Data Types: Text, numbers, dates, times, and more.
- Formatting: Change the appearance of data (fonts, colors, borders, number formats).
- Conditional Formatting: Automatically format cells based on criteria.

Formulas and Functions

1. Basic Formulas
- Arithmetic Operations: Addition (`+`), subtraction (`-`), multiplication (`*`), division (`/`).
- Cell References: Referencing other cells in formulas (e.g., `=A1+B1`).

2. Built-in Functions
- SUM, AVERAGE, COUNT, MAX, MIN: Basic statistical functions.
- IF: Conditional logic (`=IF(A1>10, "Yes", "No")`).
- VLOOKUP and HLOOKUP: Look up data in a table.
- INDEX and MATCH: More advanced lookups.
- TEXT Functions: CONCATENATE, LEFT, RIGHT, MID, TRIM, etc.
- DATE Functions: TODAY, NOW, DATE, YEAR, MONTH, DAY, etc.

3. Array Formulas
- Perform calculations on multiple values (e.g., `=SUM(A1:A10*B1:B10)`).

Data Analysis

1. Sorting and Filtering


- Sort: Organize data in ascending or descending order.
- Filter: Display only the rows that meet certain criteria.

3
2. Data Validation
- Ensure data integrity by restricting the type of data that can be entered in a cell.

3. PivotTables and PivotCharts


- PivotTables: Summarize, analyze, and explore data.
- PivotCharts: Visual representation of PivotTable data.

4. What-If Analysis
- Scenario Manager: Create and save different scenarios for your data.
- Goal Seek: Find the input value needed to achieve a specific goal.
- Data Table: Analyze how changing certain values affects the results.

Visualization

1. Charts and Graphs


- Types: Column, Line, Pie, Bar, Area, Scatter, and more.
- Customization: Add titles, labels, legends, and format the chart.

2. Sparklines
- Small charts embedded in cells to show trends.

3. Conditional Formatting
- Highlight cells with specific colors, data bars, color scales, and icon sets based on their values.

Advanced Features

1. Macros and VBA (Visual Basic for Applications)


- Automate repetitive tasks with recorded macros or by writing VBA code.

2. Power Query
- Import, clean, and transform data from various sources.

3. Power Pivot
- Create data models and perform powerful data analysis.

4. Data Analysis ToolPak


- Provides data analysis tools for statistical and engineering analysis.

Collaboration and Sharing

1. Comments and Notes


- Add comments and notes to cells for additional information.

2. Sharing and Co-authoring


- Share workbooks with others and work on them simultaneously.

3. Protecting and Securing Data

4
- Protect worksheets and workbooks with passwords.
- Set permissions for different users.

Integration and Interoperability

1. Importing and Exporting Data


- Work with data from other applications and databases (CSV, XML, JSON, etc.).

2. Integration with Other Office Apps


- Link Excel data with Word, PowerPoint, and Outlook.

3. Add-Ins and Extensions


- Extend Excel’s functionality with add-ins from Microsoft Store.

Accessibility and Usability

1. Templates
- Pre-built templates for common tasks (budgets, calendars, invoices).

2. Keyboard Shortcuts
- Enhance productivity with keyboard shortcuts (e.g., Ctrl+C for copy, Ctrl+V for paste).

3. Help and Support


- Extensive in-app help and online resources for troubleshooting and learning.

Example Use Cases

1. Budgeting and Financial Analysis


- Create detailed budgets, track expenses, and perform financial forecasting.

2. Data Tracking and Reporting


- Track project progress, sales, and performance metrics.

3. Statistical Analysis
- Perform descriptive statistics, hypothesis testing, and regression analysis.

4. Data Cleaning and Transformation


- Use Power Query and formulas to clean and prepare data for analysis.

Result:
By exploring these features, you can harness the full power of Excel for data analysis, visualization, and
management. Excel's versatility makes it a valuable tool for a wide range of applications across different
fields.

5
2. (I)GET THE INPUT FROM USER AND PERFORM NUMERICAL OPERATIONS (MAX, MIN, AVG, SUM,
SQRT, ROUND)

Aim:

To Get the input from user and perform numerical operations (MAX, MIN, AVG, SUM, SQRT, ROUND)
using builtin functions in excel
Procedure:

Here are examples of how to perform basic numerical operations in Excel using formulas. The table
below lists the operation, formula, and an example for each.

Operation Formula Syntax Example


Result
Formula
MAX =MAX(range) =MAX(A1:A5) 30
MIN =MIN(range) =MIN(A1:A5) 10
AVG =AVERAGE(range) =AVERAGE(A1:A5) 20
SUM =SUM(range) =SUM(A1:A5) 100
SQRT =SQRT(number) =SQRT(A1) 5
ROUND =ROUND(number, =ROUND(A1, 1) 25.7
num_digits)

Result : Thus formulas are applied directly in Excel to perform the respective numerical operations on
sample data.

6
2(II)PERFORM DATA IMPORT/EXPORT OPERATIONS FOR DIFFERENT FILE FORMATS.

Aim: To Perform data import/export operations for different file formats in Excel

Procedure:

Performing data import operations for different file formats in Excel involves using built-in features that
handle a variety of formats including CSV, TXT, XML, and other Excel workbooks.

a) Importing Data

A. Importing from a CSV File

1. Open Excel.

2.Go to the `Data` tab.

3. Click `Get Data` > `From File` > `From Text/CSV`.

4. Browse to the location of your CSV file, select it, and click `Import`.

5. Review the data preview and click `Load` to import the data into Excel.

B. Importing from a Text File

1. Open Excel.

2. Go to the `Data` tab.

3.Click `Get Data` > `From File` > `From Text/CSV`.

4. Select your text file and click `Import`.

5. In the Text Import Wizard, specify the file type (delimited or fixed width), delimiters, and other
settings.

6. Click `Finish` and choose where to place the data in your workbook.

C. Importing from an XML File

1. Open Excel.

2. Go to the `Data` tab.

3. Click `Get Data` > `From File` > `From XML`.

4. Browse to the location of your XML file, select it, and click `Import`.

7
5. Excel will parse the XML and allow you to load it into a worksheet.

Importing Data from Another Excel Workbook

1. Open Excel.

2.Go to the `Data` tab.

3. Click `Get Data` > `From File` > `From Workbook`.

4. Browse to the Excel file you want to import data from, select it, and click `Import`.

5. In the Navigator pane, select the table or range you want to import.

6. Click `Load` to import the data.

Using Power Query for Advanced Data Import

For more advanced data import operations, you can use Power Query:

1. Open Excel.

2. Go to the `Data` tab.

3. Click `Get Data` and choose the appropriate source (e.g., `From File`, `From Database`, `From Web`).

4. Follow the prompts to connect to the data source and import the data.

5. Use the Power Query Editor to transform and clean the data as needed.

6. Click `Close & Load` to load the data into your workbook.

Result :

These steps cover the most common data import and export scenarios in Excel.

8
Xml to Excel

9
(II)Text to EXcel

10
11
12
13
2(III)PERFORM DATA EXPORT OPERATIONS FOR DIFFERENT FILE FORMATS.

Aim: To perform data export operations for different file formats in Excel

Procedure:

Performing data export operations for different file formats in Excel involves using built-in features that
handle a variety of formats including CSV, TXT, XML, and other Excel workbooks.

Exporting Data

A. Exporting to a CSV File

1. Open your Excel workbook.

2. Click `File` > `Save As`.

3.Choose a location to save the file.

4. In the `Save as type` dropdown, select `CSV (Comma delimited) (*.csv)`.

5.Enter a file name and click `Save`.

6.Excel will prompt you with a warning about features not supported by CSV; click `Yes` to proceed.

B. Exporting to a Text File

1. Open your Excel workbook.

2.Click `File` > `Save As`.

3. Choose a location to save the file.

4. In the `Save as type` dropdown, select `Text (Tab delimited) (*.txt)` or `CSV (Comma delimited)
(*.csv)`.

5.Enter a file name and click `Save`.

C. Exporting to an XML File

1. Open your Excel workbook.

2.Click `File` > `Save As`.

3. Choose a location to save the file.

4. In the `Save as type` dropdown, select `XML Data (*.xml)`

5.Enter a file name and click `Save`.

14
6. Excel will prompt you with a message about exporting XML; click `Continue` to proceed.

D. Exporting Data to Another Excel Workbook

1. Open your Excel workbook.

2. Select the data you want to export.

3. Copy the selected data (Ctrl+C).

4. Open the target Excel workbook.

5. Select the location where you want to paste the data.

6. Paste the data (Ctrl+V).

7. Save the target workbook.

Result :

These steps cover the most common data export scenarios in Excel.

15
EX 3. PERFORM STATISTICAL OPERATIONS – MEAN, MEDIAN, MODE AND STANDARD DEVIATION,
VARIANCE, SKEWNESS, KURTOSIS

Aim:

To perform statistical operations – Mean, Median, Mode and Standard deviation, Variance, Skewness,
Kurtosis in excel

Procedure:

Excel provides various built-in functions to perform statistical operations like Mean, Median, Mode,
Standard Deviation, Variance, Skewness, and Kurtosis. By entering these formulas in any cell in Excel,
you can calculate the respective statistical measures for the data in the specified range (C1:C12) in this
case). Adjust the range as needed to fit your actual data.

Function Formula Example Result


Mean AVERAGE =AVERAGE(range) =AVERAGE(C1:C12)
54.16667
Median MEDIAN =MEDIAN(range) =MEDIAN( C1:C12)
55
Mode MODE.SNGL` (for the =MODE.SNGL(range) =MODE.SNGL(C1:C12)
40
single mode)
MODE.MULT` (for =MODE.MULT (range) =MODE.MULT ( C1:C12)
multiple modes) 40

Standard STDEV.S` (for a =STDEV.S(range) =STDEV.S(C1:C12)


27.78434
Deviation sample)
`STDEV.P` (for the =STDEV.P(range) =STDEV.P( C1:C12)
entire population) 26.60148

Variance `VAR.S` (for a sample) =VAR.S(range) =VAR.S( C1:C12) 771.969697

`VAR.P` (for the entire =VAR.P (range) =VAR.P( C1:C12)


707.6388889
population)

Skewness SKEW =SKEW(range) =SKEW(C1:C12) 0.091479852

Kurtosis KURT =KURT(range) =KURT(C1:C12) -0.817479855

single-line definitions for each of the statistical parameters:

1. Mean (Average): The sum of all data values divided by the number of values.

2. Median: The middle value of a data set when the values are arranged in ascending order.

3.Mode: The most frequently occurring value(s) in a data set.

16
4. Standard Deviation: A measure of the dispersion or spread of data values relative to the mean.

5.Variance: The average of the squared differences between each data value and the mean.

6.Skewness: A measure of the asymmetry of the data distribution around the mean.

7. Kurtosis: A measure of the "tailedness" or the sharpness of the data distribution relative to a normal
distribution.

Sample :

Result:

Thus , the statistical operations – Mean, Median, Mode and Standard deviation, Variance, Skewness,
Kurtosis are performed in excel

17
EX 4 : PERFORM Z-TEST, T-TEST & ANOVA

Aim: To Perform Z -test, T-test & ANOVA using Excel.

Procedure:
Performing statistical tests like Z-test, T-test, and ANOVA in Excel can be done using built-in functions
and the Data Analysis Toolpak.
(i) Z-test
A Z-test is used to determine if there is a significant difference between sample and population means
when the variance is known.
Steps to Perform a Z-test
1. Data Preparation:
- Suppose you have a sample data in column A (A2:A11).
- Population mean in cell G2.
- Population standard deviation in cell G3.
2. Use the `Z.TEST` function.
Formula:=Z.TEST(A2:A11, G2,G3)
Example:=Z.TEST(A2:A11, 19, 5.74)
(ii) T-test
A T-test is used to compare the means of two samples.
Steps to Perform a T-test
1.Data Preparation:
- Suppose you have two samples in columns A (A2:A11) and B (B2:B11).
2. Use the `T.TEST` function.
Formula: =T.TEST(A1:A10, B1:B10, tails, type)
- `tails`: 1 for a one-tailed test, 2 for a two-tailed test.
- `type`: 1 for paired, 2 for two-sample equal variance (homoscedastic), 3 for two-sample unequal
variance (heteroscedastic).
Example:
=T.TEST(A1:A10, B1:B10, 2, 2)
(iii)ANOVA
ANOVA (Analysis of Variance) is used to compare the means of three or more samples.
Steps to Perform ANOVA
1.Enable Data Analysis Toolpak:
- Go to `File` > `Options` > `Add-Ins`.
- In the `Manage` box, select `Excel Add-ins` and click `Go`.
- Check `Analysis ToolPak` and click `OK`.
2. Data Preparation:
- We have three samples in columns A (A2:A11), B (B2:B11), and C (C2:C11).
3. Perform ANOVA:
- Go to the `Data` tab.
- Click `Data Analysis` in the Analysis group.
- Select `ANOVA: Single Factor` and click `OK`.
- Enter the input range, select `Grouped by Columns`, check `Labels in First Row` if applicable, and
choose the output range.
Steps in Dialog:
- Input Range: `A2:C11`

18
- Grouped By: `Columns`
- Output Range: Select where you want the result to be displayed. Click `OK`.
- Excel will display the ANOVA table with the F-statistic and P-value.

Sample

Result:
Following the steps given above , Z-tests, T-tests, and ANOVA are performed in Excel to analyze the data
statistically

19
EX 5(I) : PERFORM DATA PRE-PROCESSING OPERATIONS I) HANDLING MISSING DATA

Aim: To Perform data pre-processing operations i) Handling Missing data ii) Normalization

Procedure:

Data preprocessing is crucial for preparing data for analysis, and Excel provides tools and functions to
handle common preprocessing tasks such as handling missing data and normalizing data.

Handling Missing Data:

Handling missing data typically involves

(a)Removing Rows with Missing Data (or)

(b) Imputing Missing Data with a Specific Value (e.g., Mean)

(a) Removing Rows with Missing Data

1. Select the range of data.


2. Go to the Data tab.
3. Click Filter to enable filtering.
4. Click the dropdown arrow in the column header with missing data.
5. Uncheck Blanks to filter out rows with missing values.
6. Select all visible rows (excluding the header).
7. Right-click and choose Delete Row.
8. Turn off the filter to see the cleaned data.

b) Imputing Missing Data with a Specific Value (e.g., Mean)

1. Calculate the mean of the column (excluding missing values).


 Select a blank cell where you want to calculate the mean (e.g., A11).
 Enter the formula =AVERAGE(IF(A1:A10<>"", A1:A10))
 Instead of just pressing Enter, you need to press Ctrl+Shift+Enter. This tells Excel to treat the
formula as an array formula. If done correctly, Excel will wrap the formula in curly braces {}.
 After pressing Ctrl+Shift+Enter, the formula should look like this in the formula bar:
=AVERAGE(IF(A1:A10<>"", A1:A10))}

2. Replace Missing Data with the Mean

 Copy the mean value (calculated in A11).


 Select the range where you want to fill the missing data (e.g., A1).
 Go to Home > Find & Select > Go To Special... > Blanks > OK.
 The blank cells in your range will be selected.

20
 Paste the mean value into the selected blank cells (Ctrl+V).

a) Removing Rows with Missing Data

21
b) Imputing Missing Data with a Specific Value (e.g., Mean)

22
Result:

By following the above steps, missing data is handled and dataset in Excel is prepared for further
analysis.

23
EX 5(II) : PERFORM DATA PRE-PROCESSING OPERATION: NORMALIZATION

Aim: To Perform data pre-processing operation – Normalization in sample data set by using Excel

Procedure:

Data preprocessing is crucial for preparing data for analysis, and Excel provides tools and functions to
handle common preprocessing tasks such as handling missing data and normalizing data.

Normalization

1. Calculate the Minimum and Maximum Values

 In another cell (e.g., C1), calculate the minimum value: =MIN(A1:A10)


 In another cell (e.g., C2), calculate the maximum value: =MAX(A1:A10)

2. Apply the Normalization Formula

 Select a new column where you want to store the normalized values (e.g., B1).
 In the first cell of this column (B1), enter the normalization formula
=(A1 - $C$1) / ($C$2 - $C$1)

Sample

24
Result: By following these steps, we can normalize our dataset in Excel, preparing it for further
analysis.

25
EX 6: PERFORM DIMENSIONALITY REDUCTION OPERATION USING PCA, KPCA & SVD

Aim: To Perform Performing dimensionality reduction operations such as PCA (Principal Component
Analysis), KPCA (Kernel PCA), and SVD (Singular Value Decomposition) using XLSTAT in Excel

Procedure:

Performing dimensionality reduction operations such as PCA (Principal Component Analysis), KPCA
(Kernel PCA), and SVD (Singular Value Decomposition) using XLSTAT in Excel is straightforward. XLSTAT is
a powerful add-on for Excel that provides a wide range of statistical and data analysis tools.

Prerequisites

Install XLSTAT:

- Go to the [XLSTAT website](https://www.xlstat.com) and download the add-on.

- Follow the installation instructions.

- Once installed, XLSTAT will appear as an additional tab in Excel.

Performing PCA using XLSTAT

1. Open Your Data in Excel:

- Ensure your data is arranged in a table format with variables in columns and observations in rows.

2. Open XLSTAT:

- Go to the `XLSTAT` tab in Excel.

3. Access PCA:

- Click on `XLSTAT` > `Analyzing Data` > `PCA / Factorial analysis` > `Principal Component Analysis
(PCA)`.

4. Configure PCA:

- In the PCA dialog box, select the range of your data.

- Choose whether your data includes headers.

- Specify any options relevant to your analysis, such as the number of components to extract.

5. Run PCA:

- Click `OK` to run the analysis.

26
- XLSTAT will output the results, including eigenvalues, eigenvectors, and the scores of the principal
components.

Performing KPCA using XLSTAT

1. Open Your Data in Excel:

- As with PCA, ensure your data is correctly formatted.

2. Open XLSTAT:

- Go to the `XLSTAT` tab in Excel.

3.Access KPCA:

- Click on `XLSTAT` > `Machine Learning` > `Dimensionality Reduction` > `Kernel PCA`.

4. Configure KPCA:

- In the KPCA dialog box, select your data range.

- Choose the kernel type (e.g., linear, polynomial, Gaussian).

- Set parameters specific to the kernel chosen.

5. Run KPCA:

- Click `OK` to run the analysis.

- XLSTAT will provide the transformed data and information about the kernel components.

Performing SVD using XLSTAT

1. Open Your Data in Excel:

- Again, make sure your data is in the correct format.

2. Open XLSTAT:

- Go to the `XLSTAT` tab in Excel.

3. Access SVD:

- Click on `XLSTAT` > `Machine Learning` > `Dimensionality Reduction` > `SVD`.

4. Configure SVD:

- In the SVD dialog box, select the range of your data.

- Choose whether your data includes headers.

27
- Specify any options for the analysis, such as the number of singular values to compute.

5. Run SVD:

- Click `OK` to run the analysis.

- XLSTAT will output the singular values, left singular vectors, and right singular vectors.

Example Data and Interpretation

ID Feature1 Feature2 Feature3


1 10 20 30
2 15 25 35
3 20 30 40
4 25 35 45
5 30 40 50

PCA Results

- Eigenvalues: Indicate the amount of variance captured by each principal component.

- Eigenvectors: Show the direction of each principal component.

- Scores: Represent the data in the reduced dimension space.

KPCA Results

- Kernel Components: Transformed data based on the selected kernel.

- Explained Variance: Similar to PCA but using non-linear transformations.

SVD Results

- Singular Values: Indicate the importance of each dimension.

- Left Singular Vectors: Correspond to the original data.

- Right Singular Vectors: Correspond to the features.

Result:

By following these steps and using the powerful capabilities of XLSTAT, you can perform dimensionality
reduction on your datasets and better understand the underlying structure of your data.

28
EX NO: 7(I) PERFORM BIVARIATE ANALYSIS ON THE DATASET

Aim :

To Perform bivariate analysis on the dataset using Excel.


Procedure:

Bivariate analysis involves examining the relationship between two variables. In Excel, this can be done
in several simple ways, such as using scatter plots, calculating correlation coefficients, and using pivot
tables. Here's a step-by-step guide to perform bivariate analysis:

Step-by-Step Guide for Bivariate Analysis

A. Scatter Plot

A scatter plot visually represents the relationship between two variables.

1. Select the Data:

- Highlight the data range for the two variables, e.g., `B1:C6`.

2. Insert Scatter Plot:

- Go to the `Insert` tab.

- Click on `Scatter` in the Charts group and choose the first scatter plot option.

3. Customize the Chart (Optional):

- Add chart elements like titles, axis labels, and a trendline by clicking on the chart and using the `Chart
Tools` options.

B. Correlation Coefficient

The correlation coefficient quantifies the strength and direction of the linear relationship between two
variables.

1. Select an Empty Cell:

- Choose an empty cell where you want to display the correlation coefficient.

2. Use the CORREL Function:

- Enter the formula:

=CORREL(B2:B6, C2:C6)

- Press `Enter`.

29
3. Interpret the Result:

- A correlation coefficient (r) close to 1 or -1 indicates a strong linear relationship, while an r close to 0
indicates a weak relationship.

C. Pivot Table and Pivot Chart

Pivot tables can summarize and analyze data, while pivot charts provide a visual representation.

1. Create a Pivot Table:

- Select the data range, e.g., `A1:C6`.

- Go to the `Insert` tab and click `PivotTable`.

- In the `Create PivotTable` dialog box, choose where you want the PivotTable report to be placed and
click `OK`.

2. Configure the Pivot Table:

- In the PivotTable Field List, drag `Feature1` to the `Rows` area and `Feature2` to the `Values` area.

- Ensure that `Feature2` is set to show values as `Sum` (default) or any other relevant aggregation.

3. Create a Pivot Chart (Optional):

- Click anywhere in the PivotTable.

- Go to the `PivotTable Analyze` tab and click `PivotChart`.

- Choose the desired chart type and click `OK`.

Example Steps with the Dataset

ID Feature1 Feature2
1 10 20
2 15 25
3 20 30
4 25 35
5 30 40

Scatter Plot

1. Select the Data Range:

- `B1:C6` (includes headers).

2. Insert Scatter Plot:

30
- `Insert` tab > `Scatter` > First scatter plot option.

3. Customize the Chart:

- Add a title, e.g., "Scatter Plot of Feature1 vs. Feature2".

- Add axis labels for clarity.

Correlation Coefficient

1. Select an Empty Cell:

- E.g., D1.

2. Use the CORREL Function: =CORREL(B2:B6, C2:C6)

3. Result:

- Assume the result is `1`, indicating a perfect positive linear relationship between `Feature1` and
`Feature2`.

Pivot Table and Pivot Chart

1. Create a Pivot Table:

- Select `A1:C6`.

- `Insert` tab > `PivotTable`.

2. Configure the Pivot Table:

- Drag `Feature1` to the `Rows` area.

- Drag `Feature2` to the `Values` area (default aggregation is `Sum`).

3. Create a Pivot Chart:

- Click on the PivotTable.

- `PivotTable Analyze` tab > `PivotChart`.

- Select a chart type, e.g., Column Chart.

Result:

By following these steps, you can perform bivariate analysis in Excel, gaining insights into the
relationship between two variables.

31
EX NO 7(II) PERFORM MULTIVARIATE ANALYSIS ON THE DATASET.

Aim: To Perform multivariate analysis on the dataset.

Procedure:

Multivariate analysis involves examining more than two variables to understand relationships and
patterns. In Excel, you can perform multivariate analysis using tools like multiple linear regression,
creating pivot tables, and visualizing data with charts. Here's a step-by-step guide to perform
multivariate analysis

Step-by-Step Guide for Multivariate Analysis

A. Multiple Linear Regression

Multiple linear regression analyzes the relationship between one dependent variable and two or more
independent variables.

1. Enable Data Analysis Toolpak:

- Go to `File` > `Options` > `Add-Ins`.

- In the `Manage` box, select `Excel Add-ins` and click `Go`.

- Check `Analysis ToolPak` and click `OK`.

2. Open the Regression Tool:

- Go to the `Data` tab.

- Click `Data Analysis` in the Analysis group.

- Select `Regression` and click `OK`.

3. Configure Regression:

- Input Y Range: Select the range for the dependent variable, e.g., `D1:D6` (Feature3).

- Input X Range: Select the range for the independent variables, e.g., `B1:C6` (Feature1 and Feature2).

- Labels: Check this if your input ranges include headers.

- Output Range: Select where you want the output to be displayed, e.g., `E1`.

4. Run Regression:

- Click `OK` to run the regression analysis.

32
- Excel will output the regression statistics, coefficients, and other relevant information.

B. Pivot Table and Pivot Chart

Pivot tables and pivot charts can help summarize and visualize relationships between multiple variables.

1. Create a Pivot Table:

- Select the data range, e.g., `A1:D6`.

- Go to the `Insert` tab and click `PivotTable`.

- In the `Create PivotTable` dialog box, choose where you want the PivotTable report to be placed and
click `OK`.

2. Configure the Pivot Table:

- Drag `Feature1`, `Feature2`, and `Feature3` to the `Values` area.

- Drag `ID` to the `Rows` area.

3. Create a Pivot Chart:

- Click anywhere in the PivotTable.

- Go to the `PivotTable Analyze` tab and click `PivotChart`.

- Choose the desired chart type and click `OK`.

C. Scatter Plot Matrix

A scatter plot matrix helps visualize the pairwise relationships between multiple variables.

1. Insert Scatter Plot Matrix:

- Unfortunately, Excel doesn’t have a built-in scatter plot matrix feature. However, you can use
multiple scatter plots to visualize the relationships.

2. Create Individual Scatter Plots:

- Create scatter plots for each pair of variables:

- Feature1 vs. Feature2

- Feature1 vs. Feature3

- Feature2 vs. Feature3

33
Example Steps with the Dataset

Sample data:

ID Feature1 Feature2 Feature3


1 10 20 30
2 15 25 35
3 20 30 40
4 25 35 45
5 30 40 50

Multiple Linear Regression

1. Enable Data Analysis Toolpak:

- `File` > `Options` > `Add-Ins` > `Manage: Excel Add-ins` > `Go` > Check `Analysis ToolPak` > `OK`.

2. Open Regression Tool:

- `Data` tab > `Data Analysis` > `Regression` > `OK`.

3. Configure Regression:

- Input Y Range: `D1:D6`

- Input X Range: `B1:C6`

- Labels: Check.

- Output Range: `E1`.

4. Run Regression:

- Click `OK`.

Pivot Table and Pivot Chart

1. Create a Pivot Table:

- Select `A1:D6`.

- `Insert` tab > `PivotTable`.

2. Configure the Pivot Table:

34
- Drag `Feature1`, `Feature2`, `Feature3` to `Values`.

- Drag `ID` to `Rows`.

3. Create a Pivot Chart:

- Click on the PivotTable.

- `PivotTable Analyze` tab > `PivotChart`.

Scatter Plot Matrix

1. Insert Individual Scatter Plots:

- Select the data for each pair of variables and create scatter plots:

- Feature1 vs. Feature2

- Feature1 vs. Feature3

- Feature2 vs. Feature3

2. Customize Each Scatter Plot:

- Add chart elements like titles and axis labels for clarity.

Results:

By following these steps, you can perform multivariate analysis on your dataset in Excel, helping you to
uncover relationships and patterns among multiple variables.

35
II Cycle – Power Bi Desktop

36
EX : 9 FEATURES OF POWER BI DESKTOP

Aim: To explore the features of Power Bi Desktop

Power BI Desktop is a robust business intelligence and data visualization tool that allows users to
connect to multiple data sources, transform and model data, create visual reports, and share insights.

Procedure :

Features of Power BI Desktop:

1. Data Connectivity

- Wide Range of Data Sources: Power BI Desktop supports a variety of data sources including Excel, SQL
Server, Azure, Oracle, Google Analytics, Salesforce, and many more. Users can import data from on-
premises databases, cloud services, and flat files.

- Direct Query and Import Modes: Users can choose between importing data into Power BI or directly
querying the data source. Direct query allows for real-time data retrieval and interaction.

2. Data Transformation and Preparation

- Power Query Editor: This feature allows users to clean, transform, and shape data before using it in
reports. The editor provides a user-friendly interface for performing tasks like removing columns,
filtering rows, changing data types, merging queries, and creating custom columns.

- Automated Data Preparation: Power Query can automatically detect and suggest data transformations,
which simplifies the data preparation process.

3. Data Modeling

- Relationship Management: Power BI Desktop allows users to define and manage relationships between
different tables, enabling the creation of a comprehensive data model. This is done in the Model view,
where users can visually manage and create relationships.

- Calculated Columns and Measures: Using Data Analysis Expressions (DAX), users can create calculated
columns and measures to perform complex calculations and aggregations. DAX provides a powerful way
to create custom calculations tailored to specific business needs.

4. Data Analysis Expressions (DAX)

- Rich Formula Language: DAX includes functions for date and time handling, filtering and querying,
statistical and mathematical operations, and text manipulation. It enables the creation of advanced
calculations and business logic.

- Calculated Columns: These are new columns created in a table based on DAX formulas. They are useful
for adding new data derived from existing columns.

37
- Measures: Measures are calculations used in aggregations, such as sums, averages, minimums,
maximums, and counts. Measures are dynamic and recalculated based on the context of the data in
reports and visuals.

5. Visualization and Reporting

- Interactive Visualizations: Power BI Desktop provides a wide range of visualization types, including bar
charts, line charts, pie charts, scatter plots, maps, gauges, and tables. These visuals are interactive and
allow users to drill down into data, apply filters, and explore different dimensions of their data.

- Custom Visualizations: In addition to the built-in visuals, users can import custom visuals from the
Power BI marketplace or create their own using the Power BI Developer tools.

- Themes and Formatting: Users can apply themes to standardize the look and feel of reports. Power BI
also offers extensive formatting options to customize visuals, including colors, fonts, borders, and titles.

6. Dashboards and Reports

- Report Pages: Reports in Power BI Desktop can have multiple pages, allowing users to organize visuals
and insights in a structured way.

- Drill through and Cross-Filtering: Users can create drill through pages to provide detailed views and
insights on specific data points. Cross-filtering allows for interactive data exploration across different
visuals on the same report.

- Bookmarks: Bookmarks capture the current state of a report page, including filters and slicers, and
allow users to save and navigate to specific views and configurations easily.

7. Collaboration and Sharing

- Publishing to Power BI Service: Users can publish their Power BI Desktop reports to the Power BI
Service, making them accessible online. This enables collaboration and sharing with others in the
organization.

- Shared Workspaces: Power BI Service provides shared workspaces where teams can collaborate on
datasets, reports, and dashboards.

- Row-Level Security: This feature allows administrators to define security roles and rules to control data
access at the row level, ensuring that users only see data relevant to them.

8. Integration and Extensibility

- Integration with Other Microsoft Products: Power BI seamlessly integrates with other Microsoft
products like Excel, Azure, Dynamics 365, and Teams. This integration enhances productivity and allows
for more comprehensive data analysis and reporting.

38
- APIs and SDKs: Power BI provides APIs and SDKs for developers to create custom solutions, embed
Power BI visuals in applications, and automate tasks.

- Power BI Mobile: The Power BI mobile app allows users to access reports and dashboards on mobile
devices, providing flexibility and accessibility on the go.

Results:

Power BI Desktop is a versatile and powerful tool for data analysis, visualization, and reporting. Its wide
range of features supports the entire data analysis process, from data preparation and modeling to
creating interactive reports and dashboards. Power BI's integration with other Microsoft tools and its
extensibility through APIs and custom visuals make it a valuable tool for organizations of all sizes.

39
EX NO 10: PREPARE & LOAD DATA

Aim : Preparing and loading data into Power BI.

Procedure:

Step 1: Open Power BI Desktop

1. Launch Power BI Desktop:

- Open Power BI Desktop on your computer.

Step 2: Get Data

1. Connect to Excel Data Source:

- Click on the "Home" tab.

- Select "Get Data" and choose "Excel" from the list.

- Click "Connect".

2. Select Excel File:

- Browse to the location of your Excel file (e.g., `SalesData.xlsx`) and select it.

- Click "Open".

3. Select Data from Excel:

- In the Navigator window, you will see the available sheets in the Excel file. For example, assume the
file contains a sheet named `Sales`.

- Check the box next to the `Sales` sheet to select it.

- Click "Load" to load the data into Power BI.

Step 3: Transform Data (Optional)

1. Open Power Query Editor:

- Click on "Transform Data" to open the Power Query Editor.

2. Clean and Transform Data:

- Let's say your `Sales` data has columns: `Date`, `Product`, `SalesAmount`, and `Region`.

- Remove any unnecessary columns by selecting them, right-clicking, and choosing "Remove".

40
- Change the data type of `Date` column to Date if it’s not already in the correct format by selecting
the column, going to the "Transform" tab, and choosing "Date" from the Data Type dropdown.

- Ensure all other columns are in the correct data types (e.g., `SalesAmount` should be a decimal or
whole number).

3. Apply Changes:

- Once you've made the necessary transformations, click "Close & Apply" to apply the changes and
load the data back into Power BI.

Step 4: Create Relationships (If Necessary)

1. Manage Relationships:

- If your dataset is simple and contained in one table, you might not need to create relationships.

- If you have multiple tables, go to the "Model" view by clicking on the "Model" icon on the left pane.

- Drag and drop fields to create relationships between tables.

Step 5: Create Visualizations

1. Create Visualizations:

- Go to the "Report" view by clicking on the "Report" icon on the left pane.

- In the Visualizations pane, choose a visualization type, such as a bar chart.

2. Build a Bar Chart:

- Drag the `Product` field from the Fields pane to the Axis area of the Visualizations pane.

- Drag the `SalesAmount` field to the Values area. This will create a bar chart showing sales amounts by
product.

3.Add a Slicer:

- To add interactivity, you can add a slicer. Select the Slicer visualization from the Visualizations pane.

- Drag the `Region` field to the Field area in the slicer. This will allow you to filter the data by region.

4. Customize Visualizations:

- Click on the bar chart, go to the Format pane, and customize the appearance (e.g., change colors, add
data labels, set the title).

5. Create Additional Visuals:

41
- Repeat the process to create other visualizations, such as pie charts, line graphs, and tables, to
represent different aspects of your data.

Step 6: Save and Publish

1. Save Your Report:

- Click on "File" and select "Save" to save your Power BI report as a `.pbix` file on your computer.

2. Publish to Power BI Service:

- To share your report, click on the "Home" tab and select "Publish".

- Sign in to your Power BI account.

- Choose the destination workspace where you want to publish the report.

Example Data

`SalesData.xlsx`

Date Product SalesAmount Region


2023-01-01 Product A 100 North
2023-01-02 Product B 150 South
2023-01-03 Product A 200 East
2023-01-04 Product C 250 West
2023-01-05 Product B 300 North

Result:

By following these steps, you can prepare, load, and visualize this sales data in Power BI to gain insights
into sales performance across different products and regions.

42
EX NO: 11 DEVELOP THE DATA MODEL

Aim:

Developing a data model in Power BI involves creating relationships between tables and structuring your
data in a way that supports your analysis and reporting needs. Let’s go through the steps to develop a
simple data model using an example scenario with multiple tables.

Procedure:

Assume you have the following Excel sheets:

1.SalesData:

- Columns: Date, ProductID, SalesAmount, RegionID

2. Products:

- Columns: ProductID, ProductName, Category

3. Regions:

- Columns: RegionID, RegionName

Step 1: Load Data into Power BI

1. Open Power BI Desktop:

- Launch Power BI Desktop.

2.Get Data:

- Click on the "Home" tab.

- Select "Get Data" and choose "Excel" from the list.

- Browse to the location of your Excel file and select it.

- Click "Open".

3.Select Data:

- In the Navigator window, check the boxes next to the `SalesData`, `Products`, and `Regions` sheets.

- Click "Load" to load the data into Power BI.

Step 2: Transform Data (Optional)

1. Open Power Query Editor:

43
- Click on "Transform Data" to open the Power Query Editor.

2. Clean and Transform Data:

- Ensure all data types are correct.

- Remove unnecessary columns if any.

- Click "Close & Apply" to apply the changes.

Step 3: Create Relationships

1. Go to Model View:

- Click on the "Model" icon on the left pane.

2. Create Relationships:

- SalesData and Products:

- Drag the `ProductID` field from the `SalesData` table to the `ProductID` field in the `Products` table.

- SalesData and Regions:

- Drag the `RegionID` field from the `SalesData` table to the `RegionID` field in the `Regions` table.

3. Verify Relationships:

- Ensure the relationships are set correctly. The default setting is usually a one-to-many relationship,
which should be appropriate for this example.

- Make sure the cardinality (one-to-many or many-to-one) and cross-filter direction (single or both) are
set correctly.

Step 4: Create Calculated Columns and Measures (If Necessary)

1. Calculated Columns:

- You can create calculated columns if you need to derive new data points. For example, if you want to
calculate a "Total Sales" column.

- Go to the "Data" view by clicking on the "Data" icon on the left pane.

- Select the `SalesData` table, click on "Modeling" in the top menu, and choose "New Column".

- Enter the DAX formula for the new column:

`DAX TotalSales = [SalesAmount]

2. Measures:

44
- Measures are used for calculations that are performed on aggregates (like SUM, AVERAGE).

- In the same "Modeling" tab, click "New Measure".

- Enter the DAX formula for the measure:

```DAX Total Sales Amount = SUM(SalesData[SalesAmount])

Step 5: Create Visualizations

1. Create Visualizations:

- Go to the "Report" view by clicking on the "Report" icon on the left pane.

- In the Visualizations pane, choose a visualization type, such as a bar chart, pie chart, or table.

2.Build a Bar Chart:

- Drag the `ProductName` field from the `Products` table to the Axis area.

- Drag the `Total Sales Amount` measure to the Values area. This will create a bar chart showing total
sales amounts by product.

3. Add a Slicer:

- Select the Slicer visualization from the Visualizations pane.

- Drag the `RegionName` field from the `Regions` table to the Field area in the slicer. This will allow you
to filter the data by region.

4. Customize Visualizations:

- Click on the bar chart, go to the Format pane, and customize the appearance (e.g., change colors, add
data labels, set the title).

5. Create Additional Visuals:

- Repeat the process to create other visualizations to represent different aspects of your data, like
sales trends over time or sales by category.

Relationships:

- `SalesData[ProductID]` to `Products[ProductID]`

- `SalesData[RegionID]` to `Regions[RegionID]`

Step 6: Save and Publish

1. Save Your Report:

45
- Click on "File" and select "Save" to save your Power BI report (.pbix file) on your computer.

2. Publish to Power BI Service:

- To share your report, click on the "Home" tab and select "Publish".

- Sign in to your Power BI account.

-Choose the destination workspace to publish the report.

Result:

By following these steps, we can develop a data model in Power BI, create relationships between tables,
and build insightful visualizations based on the data.

46
EX 12: PERFORM DAX CALCULATIONS

Aim: To Perform DAX (Data Analysis Expressions) using Power BI

Procedure:

DAX (Data Analysis Expressions) is a formula language used in Power BI for creating calculated columns,
measures, and custom tables. Here’s a step-by-step guide to performing DAX calculations in Power BI.

Example Scenario

Assume you have the following tables in your data model:

1. SalesData:
o Columns: Date, ProductID, SalesAmount, RegionID
2. Products:
o Columns: ProductID, ProductName, Category
3. Regions:
o Columns: RegionID, RegionName

Step-by-Step Guide

Step 1: Open Your Power BI Report

1. Open Power BI Desktop:


o Launch Power BI Desktop and open your existing report or create a new one with the
data model already set up.

Step 2: Create Calculated Columns

1. Go to Data View:
o Click on the "Data" icon on the left pane to enter the Data view.
2. Create a New Calculated Column:
o Select the SalesData table.
o Click on "Modeling" in the top menu and select "New Column".
3. Enter DAX Formula:
o Enter a DAX formula for your new calculated column. For example, to create a column
that categorizes sales amounts, use the following DAX formula:

DAX
SalesCategory = IF(SalesData[SalesAmount] > 200, "High", "Low")

4. Press Enter:
o Press Enter to create the column. The new column SalesCategory will be added to the
SalesData table.

Step 3: Create Measures

47
1. Create a New Measure:
o In the same "Modeling" tab, click "New Measure".
2. Enter DAX Formula for Measure:

Enter a DAX formula for the measure. For example, to calculate the total sales amount,
use the following DAX formula:

Total Sales Amount = SUM(SalesData[SalesAmount])


3. Press Enter:

 Press Enter to create the measure. The measure Total Sales Amount will appear in the
Fields pane under the SalesData table.

Step 4: Use Measures and Calculated Columns in Visualizations

1. Go to Report View:
o Click on the "Report" icon on the left pane to enter the Report view.
2. Create a Visualization:
o In the Visualizations pane, choose a visualization type, such as a bar chart.
3. Add Fields to Visualization:
o Drag the ProductName field from the Products table to the Axis area.
o Drag the Total Sales Amount measure to the Values area.
4. Create Additional Visualizations:
o Use the calculated columns and measures to create other visualizations, like pie charts,
line graphs, and tables.

Common DAX Calculations

 Sum of a Column

Total Sales Amount = SUM(SalesData[SalesAmount])

 Average of a Column

Average Sales Amount = AVERAGE(SalesData[SalesAmount])

 Count of Rows

Number of Transactions = COUNTROWS(SalesData)

 Conditional Calculation

High Sales Amount = CALCULATE(SUM(SalesData[SalesAmount]), SalesData[SalesAmount] > 200)

 Year-to-Date Calculation

Sales YTD = TOTALYTD(SUM(SalesData[SalesAmount]), SalesData[Date])

48
Example Advanced Calculations

 Calculate Sales Growth

1. Create a New Measure:


o Click "New Measure" and enter the DAX formula for sales growth:

Sales Growth =

DIVIDE(

(SUM(SalesData[SalesAmount]) - CALCULATE(SUM(SalesData[SalesAmount]),
DATEADD(SalesData[Date], -1, YEAR))),

CALCULATE(SUM(SalesData[SalesAmount]), DATEADD(SalesData[Date], -1, YEAR))

 Calculate Moving Average

1. Create a New Measure:


o Click "New Measure" and enter the DAX formula for a 3-month moving average:

3 Month Moving Avg Sales =

AVERAGEX(

DATESINPERIOD( SalesData[Date], LASTDATE(SalesData[Date]), -3, MONTH ), [Total Sales


Amount] )

Save and Publish Your Report

1. Save Your Report:


o Click on "File" and select "Save" to save your Power BI report (.pbix file) on your
computer.
2. Publish to Power BI Service:
o To share your report, click on the "Home" tab and select "Publish".
o Sign in to your Power BI account.
o Choose the destination workspace to publish the report.

Result:

By following these steps, we can perform various DAX calculations in Power BI to enhance data
analysis and reporting capabilities.

49
EX 13: DESIGNING A REPORT IN POWER BI

Aim: To create a comprehensive and interactive report in Power BI. Experiment with different
visualizations and formatting options to enhance your data presentation.

Procedure:

Step 1: Launch Power BI Desktop

1. Open Power BI Desktop from your applications menu.

2. Familiarize yourself with the Power BI interface, including the Ribbon, Fields pane, Visualizations
pane, and Report canvas.

Step 2: Import Data

1. Click on the **Home** tab.

2. Select **Get Data** > **Choose the data source** (e.g., Excel, SQL Server, etc.).

3. Navigate to your data file, select it, and click **Open**.

4. In the Navigator window, select the tables or sheets you want to load.

5. Click **Load** to import the data into Power BI.

Step 3: Data Transformation

1. Click on the **Home** tab.

2. Select **Transform Data** to open the Power Query Editor.

3. Use the tools in the Power Query Editor to clean and transform your data:

- Remove unnecessary columns

- Filter rows

- Rename columns

- Change data types

4. After making the necessary transformations, click **Close & Apply**.

Step 4: Create Visualizations

1. Go to the **Report** view.

50
2. Select the type of visual you want to create from the Visualizations pane (e.g., bar chart, line chart, pie
chart).

3. Drag and drop fields from the Fields pane to the appropriate areas in the Visualizations pane (e.g.,
Axis, Values, Legend).

4. Customize the visual using the formatting options in the Visualizations pane.

Step 5: Design the Report

1. Add multiple visuals to your report canvas by repeating the steps in Step 4.

2. Arrange the visuals on the canvas for a coherent layout.

3. Use the formatting tools to:

- Add titles and labels

- Change colors and themes

- Adjust the size and position of visuals

4. Use slicers and filters to make your report interactive.

Step 6: Add Text Boxes and Images

1. Click on the **Insert** tab.

2. Select **Text box** to add descriptive text to your report.

3. Choose **Image** to insert logos or other images.

Step 7: Publish the Report

1. Save your report by clicking **File** > **Save As**.

2. Click on the **Home** tab.

3. Select **Publish** > **Publish to Power BI**.

4. Sign in to your Power BI account if prompted.

5. Choose the workspace where you want to publish the report and click **Select**.

Step 8: Share the Report

1. Once published, navigate to the Power BI service (app.powerbi.com).

2. Locate your report in the selected workspace.

51
3. Click on the report to open it.

4. Click on **Share** to distribute your report with others by entering their email addresses.

Best Practices

- Keep your visuals simple and avoid clutter.

- Use consistent colors and themes for a professional look.

- Regularly save your work to avoid losing progress.

- Test your report on different devices to ensure responsiveness.

Result:

By following these steps, We have created a comprehensive and interactive report in Power BI and
Experimented with different visualizations and formatting options to enhance data presentation.

52
EX NO: 14 CREATE A DASHBOARD AND PERFORM DATA ANALYSIS

Aim:

Creating a dashboard and performing data analysis using Power BI involves several steps, from data
import and transformation to visualization and sharing the dashboard. Below is a comprehensive guide
to help you create a Power BI dashboard and perform data analysis.

Procedure:

Step 1: Launch Power BI Desktop

1. Open Power BI Desktop from your applications menu.

2. Familiarize yourself with the interface, including the Ribbon, Fields pane, Visualizations pane, and
Report canvas.

Step 2: Import Data

1. Click on the Home tab.

2. Select **Get Data** > Choose the data source (e.g., Excel, SQL Server, etc.).

3. Navigate to your data file, select it, and click **Open**.

4. In the Navigator window, select the tables or sheets you want to load.

5. Click **Load** to import the data into Power BI.

Step 3: Data Transformation

1. Click on the Home tab.

2. Select **Transform Data** to open the Power Query Editor.

3. Use the tools in the Power Query Editor to clean and transform your data:

-Remove unnecessary columns

- Filter rows

- Rename columns

- Change data types

4. After making the necessary transformations, click **Close & Apply**.

53
Step 4: Data Analysis

1. Understand the data: Explore the imported data to understand its structure and content.

2. Identify key metrics and dimensions: Determine which metrics (e.g., sales, profit) and dimensions
(e.g., date, region) are important for your analysis.

3. Create calculated columns and measures: Use DAX (Data Analysis Expressions) to create new
calculated columns and measures that can help in your analysis.

Step 5: Create Visualizations

1. Go to the Report view.

2. Select the type of visual you want to create from the Visualizations pane (e.g., bar chart, line chart, pie
chart).

3. Drag and drop fields from the Fields pane to the appropriate areas in the Visualizations pane (e.g.,
Axis, Values, Legend).

4. Customize the visual using the formatting options in the Visualizations pane.

Step 6: Design the Dashboard

1. Add multiple visuals to your report canvas by repeating the steps in Step 5.

2. Arrange the visuals on the canvas for a coherent layout.

3. Use the formatting tools to:

- Add titles and labels

-Change colors and themes

- Adjust the size and position of visuals

4. Use slicers and filters to make your dashboard interactive.

Step 7: Add Text Boxes and Images

1. Click on the Insert tab.

2. Select **Text box** to add descriptive text to your dashboard.

3. Choose **Image** to insert logos or other images.

Step 8: Publish the Dashboard

1. Save your report** by clicking **File** > **Save As**.

54
2. Click on the **Home tab.**

3. Select **Publish** > **Publish to Power BI**.

4. Sign in to your Power BI account if prompted.

5. Choose the workspace where you want to publish the report and click **Select**.

Step 9: Share the Dashboard

1. Once published, navigate to the Power BI service (app.powerbi.com).

2. Locate your dashboard in the selected workspace.

3. Click on the dashboard to open it.

4. Click on **Share** to distribute your dashboard with others by entering their email addresses.

Example: Sales Dashboard

Data Source

- An Excel file containing sales data with columns for Date, Region, Product, Sales Amount, and Profit.

Visualizations

1.Bar Chart: Total Sales by Region

2.Line Chart: Sales Trend Over Time

3. Pie Chart: Sales Distribution by Product

4. KPI: Total Sales Amount

5. Table: Detailed Sales Data

Result:

By following these steps, we can create a comprehensive and interactive dashboard in Power BI that
provides valuable insights into your data. Experiment with different visualizations and formatting
options to enhance your data presentation.

55
EX NO 15 : CASE STUDY PRESENTATION USING POWER BI

Case Study (i): Analyzing Employee Performance in an Organization

Aim:

To analyze and visualize the performance of employees in an organization using Power BI, focusing on
key metrics such as employee satisfaction, performance ratings, training hours, and attendance records.

Procedure:

Data Source

File Type: Excel

- Data Columns: Employee ID, Name, Department, Job Title, Performance Rating, Satisfaction Score,
Training Hours, Absence Days

Step-by-Step Process

Step 1: Import Data

1. Launch Power BI Desktop.

2. Import Data: Click on Home > Get Data > Excel.

3. Load Data: Navigate to your Excel file, select it, and click Open. In the Navigator window, select the
relevant tables or sheets and click Load.

Step 2: Data Transformation

1.Open Power Query Editor: Click on Home > Transform Data.

2. Clean Data: Perform necessary data transformations, such as removing unnecessary columns, filtering
rows, renaming columns, and changing data types.

3.Close & Apply: After making the necessary transformations, click Close & Apply.

Step 3: Create Calculated Columns and Measures

1. Calculated Columns: Create new calculated columns if needed using DAX (Data Analysis Expressions).

2. Measures: Define measures for key metrics such as Average Performance Rating and Average
Satisfaction Score.

DAX

Average Performance Rating = AVERAGE(Employee[Performance Rating])

56
Average Satisfaction Score = AVERAGE(Employee[Satisfaction Score])

Step 4: Create Visualizations

1. Bar Chart (Average Performance Rating by Department):

- Select Clustered Bar Chart from the Visualizations pane.

- Drag Department to the Axis field.

- Drag Performance Rating to the Values field and set it to Average.

2. Line Chart (Satisfaction Score Trend Over Time):

- Select Line Chart from the Visualizations pane.

- Drag Date to the Axis field (if date data is available).

- Drag Satisfaction Score to the Values field and set it to Average.

3. Pie Chart (Training Hours Distribution by Department):

- Select Pie Chart from the Visualizations pane.

- Drag Department to the Legend field.

- Drag Training Hours to the Values field.

4. KPI (Average Satisfaction Score):

- Select KPI from the Visualizations pane.

- Drag Satisfaction Score to the Indicator field.

- Drag Date to the Trend axis field (if date data is available).

5. Table (Detailed Employee Data):

- Select Table from the Visualizations pane.

- Drag relevant columns (Employee ID, Name, Department, Job Title, Performance Rating, Satisfaction
Score, Training Hours, Absence Days) to the Values field.

Step 5: Design the Dashboard

1. Arrange Visuals: Place the created visuals on the canvas for a coherent layout.

2. Format Visuals: Use the formatting options to add titles, labels, and adjust colors and themes.

57
3. Add Slicers: Insert slicers for interactive filtering. For example, add slicers for Department and Job
Title to allow users to filter the data dynamically.

Step 6: Add Text Boxes and Images

1.Text Boxes: Click on Insert > Text box to add descriptive text and explanations to your dashboard.

2. Images: Click on Insert > Image to add logos or relevant images.

Step 7: Publish the Dashboard

1. Save the Report: Click on File > Save As to save your Power BI report.

2. Publish: Click on Home > Publish > Publish to Power BI. Sign in to your Power BI account, choose the
workspace, and click Select.

Step 8: Share the Dashboard

1. Open Power BI Service: Navigate to app.powerbi.com.

2. Locate the Dashboard: Find your dashboard in the selected workspace.

3. Share: Click on Share to distribute the dashboard by entering email addresses or generating a
shareable link.

4. Dashboard Analysis

- Average Performance Rating by Department: Identify which departments have the highest and lowest
performance ratings.

- Satisfaction Score Trend Over Time: Observe the trend in employee satisfaction and identify any
patterns or significant changes.

-Training Hours Distribution by Department: Determine which departments are receiving the most
training and their training hours distribution.

- Average Satisfaction Score KPI: Monitor the overall employee satisfaction with a quick glance.

- Detailed Employee Data Table: Provide a detailed view of employee data for in-depth analysis.

5. Conclusion

This case study demonstrated how to utilize Power BI to analyze and visualize employee performance
data effectively. By following the outlined steps, we can create an interactive and insightful dashboard
that helps in making informed decisions related to employee management and performance
improvement.

58
EX NO 15 : CASE STUDY PRESENTATION USING POWER BI

Case Study (i): Analyzing Employee Performance in an Organization

Aim:

To analyze and visualize the performance of employees in an organization using Power BI, focusing on
key metrics such as employee satisfaction, performance ratings, training hours, and attendance records.

Procedure:

Data Source

File Type: Excel

- Data Columns: Employee ID, Name, Department, Job Title, Performance Rating, Satisfaction Score,
Training Hours, Absence Days

Step-by-Step Process

Step 1: Import Data

1. Launch Power BI Desktop.

2. Import Data: Click on Home > Get Data > Excel.

3. Load Data: Navigate to your Excel file, select it, and click Open. In the Navigator window, select the
relevant tables or sheets and click Load.

Step 2: Data Transformation

1.Open Power Query Editor: Click on Home > Transform Data.

2. Clean Data: Perform necessary data transformations, such as removing unnecessary columns, filtering
rows, renaming columns, and changing data types.

3.Close & Apply: After making the necessary transformations, click Close & Apply.

Step 3: Create Calculated Columns and Measures

1. Calculated Columns: Create new calculated columns if needed using DAX (Data Analysis Expressions).

2. Measures: Define measures for key metrics such as Average Performance Rating and Average
Satisfaction Score.

DAX Average Performance Rating = AVERAGE(Employee[Performance Rating])

Average Satisfaction Score = AVERAGE(Employee[Satisfaction Score])

Step 4: Create Visualizations

1. Bar Chart (Average Performance Rating by Department):

- Select Clustered Bar Chart from the Visualizations pane.

59
- Drag Department to the Axis field.

- Drag Performance Rating to the Values field and set it to Average.

2. Line Chart (Satisfaction Score Trend Over Time):

- Select Line Chart from the Visualizations pane.

- Drag Date to the Axis field (if date data is available).

- Drag Satisfaction Score to the Values field and set it to Average.

3. Pie Chart (Training Hours Distribution by Department):

- Select Pie Chart from the Visualizations pane.

- Drag Department to the Legend field.

- Drag Training Hours to the Values field.

4. KPI (Average Satisfaction Score):

- Select KPI from the Visualizations pane.

- Drag Satisfaction Score to the Indicator field.

- Drag Date to the Trend axis field (if date data is available).

5. Table (Detailed Employee Data):

- Select Table from the Visualizations pane.

- Drag relevant columns (Employee ID, Name, Department, Job Title, Performance Rating, Satisfaction
Score, Training Hours, Absence Days) to the Values field.

Step 5: Design the Dashboard

1. Arrange Visuals: Place the created visuals on the canvas for a coherent layout.

2. Format Visuals: Use the formatting options to add titles, labels, and adjust colors and themes.

3. Add Slicers: Insert slicers for interactive filtering. For example, add slicers for Department and Job
Title to allow users to filter the data dynamically.

Step 6: Add Text Boxes and Images

1.Text Boxes: Click on Insert > Text box to add descriptive text and explanations to your dashboard.

2. Images: Click on Insert > Image to add logos or relevant images.

Step 7: Publish the Dashboard

1. Save the Report: Click on File > Save As to save your Power BI report.

60
2. Publish: Click on Home > Publish > Publish to Power BI. Sign in to your Power BI account, choose the
workspace, and click Select.

Step 8: Share the Dashboard

1. Open Power BI Service: Navigate to app.powerbi.com.

2. Locate the Dashboard: Find your dashboard in the selected workspace.

3. Share: Click on Share to distribute the dashboard by entering email addresses or generating a
shareable link.

4. Dashboard Analysis

- Average Performance Rating by Department: Identify which departments have the highest and lowest
performance ratings.

- Satisfaction Score Trend Over Time: Observe the trend in employee satisfaction and identify any
patterns or significant changes.

-Training Hours Distribution by Department: Determine which departments are receiving the most
training and their training hours distribution.

- Average Satisfaction Score KPI: Monitor the overall employee satisfaction with a quick glance.

- Detailed Employee Data Table: Provide a detailed view of employee data for in-depth analysis.

Conclusion

This case study demonstrated how to utilize Power BI to analyze and visualize employee performance
data effectively. By following the outlined steps, we can create an interactive and insightful dashboard
that helps in making informed decisions related to employee management and performance
improvement.

61
EX NO 15 : CASE STUDY PRESENTATION USING POWER BI

Case Study (ii): Sales and Marketing Performance Analysis

Aim:

The goal of this case study is to analyze the performance of a company’s sales and marketing efforts.
The analysis will focus on understanding sales trends, customer segmentation, campaign effectiveness,
and regional performance. This analysis will help the company identify key areas of improvement and
make data-driven decisions to enhance overall business performance.

Procedure :

Data Sources

- SalesData.xlsx: Contains details of sales transactions.

- CustomerData.xlsx: Contains customer demographic information.

- MarketingCampaigns.xlsx: Contains information about marketing campaigns and their results.

- ProductData.xlsx: Contains details about the products sold.

- Regions.xlsx: Contains information about different sales regions.

Key Metrics to Analyze

1. Total Sales Revenue: The sum of all sales transactions.

2. Sales by Product: Revenue generated by each product.

3. Sales by Region: Revenue generated in each sales region.

4. Customer Segmentation: Analysis of customer demographics such as age, income, and location.

5. Campaign Effectiveness: The impact of different marketing campaigns on sales.

6. Sales Trends Over Time: Monthly and yearly sales trends.

7. Customer Lifetime Value (CLTV): The predicted revenue from a customer over the entire relationship.

8. Return on Investment (ROI) for Campaigns: The ROI for each marketing campaign.

Step 1: Data Preparation

1. Load Data into Power BI:

62
- Import the data from `SalesData.xlsx`, `CustomerData.xlsx`, `MarketingCampaigns.xlsx`,
`ProductData.xlsx`, and `Regions.xlsx`.

2. Transform Data:

- Clean and transform the data, such as ensuring proper data types and removing any unnecessary
columns.

- Combine relevant tables where necessary (e.g., linking `SalesData` with `CustomerData` using
Customer ID).

3. Create Relationships:

- Establish relationships between tables:

- `SalesData[ProductID]` to `ProductData[ProductID]`

- `SalesData[CustomerID]` to `CustomerData[CustomerID]`

- `SalesData[RegionID]` to `Regions[RegionID]`

- `SalesData[CampaignID]` to `MarketingCampaigns[CampaignID]`

Step 2: Create DAX Measures

1. Total Sales Revenue:

DAX Total Sales Revenue = SUM(SalesData[SalesAmount])

2. Average Sales per Customer:

DAX Avg Sales per Customer = AVERAGEX(VALUES(SalesData[CustomerID]), [Total Sales Revenue])

3. Customer Lifetime Value (CLTV):

DAX CLTV = CALCULATE(SUM(SalesData[SalesAmount]), ALLEXCEPT(CustomerData,


CustomerData[CustomerID]))

4. Campaign ROI:

DAX Campaign ROI = DIVIDE([Total Sales Revenue], SUM(MarketingCampaigns[CampaignCost]))

5. Monthly Sales Trend:

DAX Monthly Sales = CALCULATE([Total Sales Revenue], DATESINPERIOD(SalesData[Date],


MAX(SalesData[Date]), -1, MONTH))

```

63
Step 3: Visualizations

1. Sales Overview Dashboard:

- Total Sales Revenue: Display as a card visualization.

- Sales by Product: Display as a clustered bar chart.

- Sales by Region: Display as a map visualization.

- Sales Trends Over Time: Display as a line chart showing monthly and yearly sales trends.

2. Customer Insights Dashboard:

- Customer Segmentation: Display as a pie chart showing the distribution of customers by age group,
income level, etc.

- Average Sales per Customer: Display as a card visualization.

- Customer Lifetime Value (CLTV): Display as a bar chart segmented by customer demographics.

3. Marketing Campaign Performance Dashboard:

- Campaign Effectiveness: Display as a stacked bar chart showing sales attributed to each marketing
campaign.

- Campaign ROI: Display as a card visualization for each campaign.

- Sales by Campaign: Display as a pie chart.

4. Regional Performance Dashboard:

- Sales by Region: Display as a heat map.

- Top Performing Regions: Display as a ranked bar chart.

- Sales by Region Over Time: Display as a line chart to show trends in different regions.

Step 4: Insights and Recommendations

1. Identify Top-Selling Products:

- Products that contribute the most to revenue can be prioritized for marketing and sales efforts.

2. Analyze Underperforming Regions:

- Regions with lower sales might require targeted campaigns or investigation into market challenges.

3. Customer Segmentation:

64
- Tailor marketing strategies to target high-value customer segments identified in the customer
segmentation analysis.

4. Evaluate Campaign Effectiveness:

- Discontinue or optimize campaigns with low ROI and invest more in high-performing campaigns.

5. Sales Trend Analysis:

- Use trend analysis to forecast future sales and adjust inventory and marketing strategies accordingly.

Step 5: Presentation Structure

1. Introduction:

- Brief overview of the company and the purpose of the analysis.

2. Data Overview:

- Description of the data sources used in the analysis.

3. Key Findings:

- Summary of the most important insights from the analysis.

4. Dashboard Walkthrough:

- Detailed walkthrough of each dashboard, explaining the visualizations and insights.

5. Recommendations:

- Actionable recommendations based on the analysis.

6. Conclusion:

- Final thoughts and next steps for the company.

Step 6: Save and Publish the Report

1. Save the Report:

- Save the Power BI report as a `.pbix` file.

2. Publish the Report:

- Publish the report to the Power BI Service for sharing with stakeholders.

65
Conclusion

By following this case study, you can demonstrate how Power BI can be used to perform a
comprehensive analysis of sales and marketing performance, leading to data-driven decision-making
and improved business outcomes.

66

You might also like