BA Assignment 3 CP1
BA Assignment 3 CP1
1: You are provided with the following HR data and Pay details of theemployeesw
in your cormpany:
HR Data:
Employee Name Date of Birth Designation
Emp_D
A001 Ankita Sharma 23-03-1993 Team Lead
D A T A
M O O I
Mahesh Kumar 24-12-1985 Assistant Manager
M O 0 2
andthelowest
(0) Identify theemployees withthe highest
Fund (PF).
4.10
Solution 1:
(a) To merge both data sources
and transform
and prepare data for
may perfom the following steps: Payroll
Open anew Excelsheet and click on the Data tah
Under the 'Get & Transform Data' group, click on
computaiA,
Workbook to launch the Import Data dialog box. Get Data >From
Select the first data source, namely the workbook
Import. In the Navigator pane, tick the 'Select ffile the HR containing File>Tra
containing the HR data. Click on Load. multiple items' option,
then
Repeat the previous step to import data from
fle containing the Pay details of the second data
employees. source, namely
Click on Get Data >Launch (the we
Power Query Editor to
access
Click on Home > Merge
Queries > Merge Queries as New the imported data.
Select HR Data as the first table to launch the
and Pay Details as the Me
key column in both the tables, second table. Since
of the pane should confirm select this column in both sections. At
a match of all rows.
Click OK. this poinEmp
t, the
IDy
ctI HR Data Powe Query
Tnnstorm Merge
Select tables and maching coumes to
reate amerged table.
L
HR Data
Enslom Na Desetoe
AO01 Ankita [harma 2B1993 Team Lead
AO02 Ami Sinch 18091906 Suoevisoe
As Vema
Deepak Re
02031970 Senior Manae ery Setings
t101979 Mang
2006-1969 Senior Manger EES
operies
Navigate to the Query Settings Pane to rename this query as Payroll, then press
Enter.
Using the Current View slider, scroll to the Pay Details Column and click
on the button
the column header to expand the query. Click on Expand, then OK to
expand the merged
query.
SUMMARIZATION AND ANALY TICSIN SPREADSHEET
DATA 4.11
Query Editor
Paynol Power
Transfomn
Add Column View
Home
Properties
Data Type te
L AdvancedEdtor
hoose Rernove eep Remove Ue Fira RowmWedes
Refresh
Manage Columns Columns" Ros Rows sple Group
Raplaa Velues
LAgpens Queks
y
Ce Prview
Query
Manage Columns Reduce Rows Sorn
Gortne Fles Mansed
Trnsdorm Pararneta
Contine Paramet
X Table.Nested)oin(uHA Data", ("np _10), Pay Detalls", (tnp _10),
"y
HR Data Employee Neme Dteof Birth Me Deslgnatlon
1 Ankita Sharrma yDatals
Pay Detoils 23-03-1993 T
Emp. Amit Singh 18-09-1986 S
Poyrol!
Asha Verma 02-03-1970 O bpand O Aggregate
AD02 | Deepak Rai 11-10-1979M selecd Al Columns)
AO03 iGirish Jha 20-06-1969 Emp D
DOO1 6 Gauri Sharrma 27-07-1987 Basic Salary
GOOL
7 Madhav Sen 06-11-1992T Advance Salary Paid
GO02 Mahesh Kumar DA S)
24-12-1985Ad
9 MO02
Mohan Singh 29-01-1972 HRA %)
10 Meena Otha 16-02-1999oT TDS Rate
t oMO03
Payrol!Sheet
Baas'sic ouc
formula inthe
A o nh o s
following
enterthe Group By
Salang
R a t c + [ P FContribution).
Add groaping
Salary'
Click OK to generate the new column 'Net Neow colmn name Operstion
click on
Select this column, navigate to the Transform tab, Data type and Average Salary Average
Currency. 10 AT AM Rows
Advancee Salary
Since the computation does notrequirethe column, right click 11
Add aggregation
Click on Home> Close &Loadto generate update the Output sheet inthe ) 14
Select the Basic Salary, Gross Salary, Deductions andINet Salary columns, wot Excel 15
the Home tab and specify the number format as Currency. Similarly, select then naviga the query containing the: average net salary of
TDS Rate and PF Contribution columns and specify the format as the generate
tothe Home tab, then click on Close & Load to generate thedesignations. all
the final output. t Percentage DAR Click
OKto
Navigate
wworkbook.
Average Salary
sheet
in the Excel
E F Output Average Salary column, navigate to the Home tab in the Excel
Designaton
TesnLead
ClBasie Sslary DA- HRA ToS Rate -PF Contributlon Gross Salary - Deductlons - Net Salary -
R48,000.00 30% 16% 10% 17% 70,080.00 12960.00 57,120.00 Oueries &Conniectione Selectthe
format to Currency to produce the final output. workbook and
Team Lead (45500.00 30% 15 16% 65,975.00 11830.00 54,145.00 Ouerfes Connectons the
number
Supervisor 58AS0.00 40% 17X 15% 10% 91,766.50 14,612,s0 77,154.00 4queries
change
G
Team leed 46950.00 30% 15 10% 229% T68,077.50 15,024.00 53.053.50 B
J6 Senior Manager R115,880.00 S0%
92,325.00 40%
27%
252%
30%
25%
15% 2,0S, 107.60 "52,146.00 R152,961.60
17% 152,336.25 38,776.50 1,13,559.75
HR Data A
Average Salary Queries &Connections
Manager 16(ows loaded. S5,239.0o
Team Lead R49250.00 30% 17% 10% 22% $72,397.50 15,760.00 56,637.50 Deslgnaton
Queries Conecions
Senior Manager 121200.00 50% 27% 30X 17% 2,14524.00 56,964.00 R1,57,560.00 Pay Detals 2T e a mLead
K78,695.75
o AssstantManager 89350.00 40% 24% 25X 15% 1A6,534.00 16 (ows loaded K146,731.65 4queres
R35,740.00 K1,10,794.00, Supervisor
1Supervisor (6L250.00 40% 17% 15% 11% 96,162.50 15,925.00 80,237.50 R4,13,559.75
Payrol
Senior
Manager
Click OKto
gencrate the new
>Custom
column
Column
Gross Salary'.
Enter the New Column
BUSINES p 4 A
Cpone
Dets lype h
Deductiong
asDeuet
=[Basic Group By
Speitytthe coumns o group by and one or more outout,
the new column
Click OK to generate m
O
Basic O Advand
Column >
Custom Column. Enter the New Column 1 A
Click on Add
.
and enter the
following formula in the Custom column formula Name as"Ded 2
Designstion
[Deductions].
Currency.
type anu |Average Salary Average
NAsday
Since the computation does not requirethe Advance Salary column, right click Cags Al
d ggregution
| AlRows
Click on Home> Close &Load to generate update the Output sheet in the Excel 14
15
Select the Basic Salary, Gross Salary, Deductions and I Net Salary
the Home tab and specifythe number format as Currency. Similarly, columns, then
naDA,vigaA
IoUNS16ROH
TDS Rate and PF Contribution columns and specify the select the Click OK to generatethe query containing the average net salary of all designations.
format as
the final output. Percentage to prod to the
Home tab, then click on Close & Load to
workbook. generate the Average Salary
in the Excel
Navigate
G sheet
K
-RAsle Salbry DA HRA
Designation TDSRate PF Contributlon GrossSalaryDeductlons Net 5alary -
Queries &Connecioe
Output
Average Salary column, navigate to the Home tab in the
Currency to produce the final output. Excel workbook and
2Team erd R48,000.00 30% 16% 10% 17% 70,080.00 12960.00 S7,120.00 Selectthe
itean lead 45500.00 30% 15% 10% 16% 65,975.00 11830.00 S4,145.00 Quertes Connectong number format
to
Supervisor 584S0.00 40% 15% 10% 91,766.50 14,612,50 7m,154.00 the
change
Team Lead 46,950.00 30% 15% 10% 4queries
K115880.00 S0X 27%
222 68,077.50 15,02A.00 53,053.50 D G
k Seníor Manager 15% 2,05,107.60 RS2,146.00 K152,961.60
|7 Manager t92.325.00 40% 25% 25% 17% 152,336.25 38,776.50 1,13,559.75
HR Data
16rows loded.
A -Average Salary Queries &Connections
TeamLead 49,250.00 30% 17% 10% 22% K55,239.00
72,397.50 15,760.00 56,637.50 Deslgnatlon
Senior Manager "121,200.00 50% 27% 30N 17% 2,14,524.00 R56,964.00
1,57,560.00 u Pay Detals 2TeamLead 78,695.75 Queses Cornecions
o Assistant Manager (89,350.00 40% 24% 25% 15% 1A6,534.00 R35,740.00 16 rows loaded.
Supervisor (61,250.00 40% 17% 15% 11% 96,162.50
1,10,794.00, Supervlsor K146,731.65 4queses
ll2Assistant Manager t82470.00 40% 22% 15%
15,925.00 80,237.50 DPayoh SenlorM a n a g e r 1,13,559.75
11% K133,601.40
K21,442.20
l3Assistant Manager 87,350.00 40% 229% 20% 10% 141,507.00 26,205.00 1,12,159.20 16 1oWs loaded 1,10,889.32 R
Data
I4 Asslstant Manaer &5235.00 40% 229% 20% 1,15,302.00 sMansger
18% 138,080.70 32,389.30
K1,05,691.40. WAverage Salary
6 Ass/stantManager
16ros loaded
siSenior Manager L,05,000.00 S0% 27 30%
6Assistant Manager R88,400.00 40% 249 21% 1,85,850.00 53,550.00 1,32,300.00 S rows loaded
7Senior Manager
20% 19% 14,976.00 34476.00 1,10 500.00 Pay Detais
110850.00 S0% 27% 30% 17% 196,204.50 R52,099.50R1,44,105.00 16 rows loaded
Payrcl
(c) To compute the average net salary of all
following steps:
Right click on the 'Payroll' query from the Query
new query as Average Salary.
Navigate to the Transform tab. Click on Group By
categories of employees, the analyst may perforn te
Pane, then select Duplicate. Rename ti: ale
15
(d) To
identify the employees
withthe
16 rows loded
DAvercge Sslary
51owsloded
lhc
T r a n s f o r
this
Select > Query
updates
he
Statistics
timely
clickon
2205S0).
is Security
(inthis
case,it
step
under Goernance and
tlhe
previous
can
be used to create centralized data pipelincs, ensuring consistency
Click on the organization. and
. Navigatetothe PF Contribution Amount column. Click on the header dropdown ande Dgta
standardization
Q u e r y
across
data
sources.
to
SelectBasic is an with data
access
Power
Byleveraging
a the
anstom
A d C o l
Aotes
X Manage Data so
ilConnbine Files and
KAO ßemove
Parameter.Souroe
Rows Bony
Transform Combine Parameters Data Sources
Ates
cots" (hm
Redce Rows
Sort
NewOun an
With Power
Pivot, an analyst can import large volumes of data from
Mane CoAumns
Custom3", cach [PF
Contrlbutlon Amount] 2)0s0) isanalysis various
between tables, and perform complex
calculations, all within an Excel
Table.selectRONs(e"Added
. Pivot
l otherwise
d
integrate data from various s . facilitatesthe creation of relationships among different tables, just as
Power Query allows the analyst to casily connect to and Creation: It
d a t a b a s e s ,
sources,
including Excel workbooks, CSV:fles, databases (SQL Server, Oracle, etc.), and lonline data Model
relational database.
Data in a
lists, 2. : Power Pivot uses DAX formulas for advanced calculations
sources such as web APls and SharePoint (DAX):1
a c h i e v e d
itis Expressions
Regardless of the data's original format or structure, Power Query can transform and resh
Analysis
Data
3.
a n d
d a t a m a n i p u l a t i o n .
Power Query empowers users to independently access, clean, and transform data withet with Power BI: Power pivot
interrupting their workflow. I n t e g r a t i o n
visualization andIreporting.
5. enhanced
It also allows users to create and share reusable data pipelines, collaborate with others on for
data projects, and automate routine data tasks. P o w e rP i v o t E n v i r o n m e n t
SUMMARIZATNON
418
Click on
Jaunchanthe
Chart
Styles to
lnsertPivotChart,
selccttthe
navigateto
Style and Color
the
of the
PivoIChart,
PlvotChart Analyze
tab. sti
Sliccr dialog box. Check the boxes against the requircd
BUSINES AND ANALYTICS IN
Tables
270
SPREADSHEET
6575 4.19
active MA
Vih 455
April
Tables
1500
350
Apil East
Tables
1740
OK,
Power Pivot Weat
Elective Use of
Tables
475
4590 Pebruary South
Guidelines for Pivot ae 1275 Match
potential of Power tool for data Chairs
10300 Norh
To efictively leverage
the
outlined below: modeling and Chairs
800
1700 January
may follow the
(a) Import
guidelines
and Clean
Data: To ensure data integrity, it is essential to
systematically before importing it. removs
Dnahysis, Chairs
Chairs
740
1300
9200
8500
June
March North
South
data and organize itt March
the
and linkimported data
b) Optimize Data Model: ldentify eliminate redundant. tables using 100nssiC provided with the profit margin sheet and the
e excel
workbooks, product name and West
category mapping
establish optimized relationships, data and enhanceprimary 1
separate
alsO
gre in
model isloanation
Vou Product Name
Hierarchies: To. streamline data analysis, create and implement Profit Margin (%of
(c) Use
model (e.g. Department > Team >Employee) to be able to drill down orhierarchies periort P r o d u cD
t
Dishwasher Sales)
intuitive deeperup throughwithin di gb Cooking Stove 12,.25%
levels of data granularity, and thereby facilitate a more
A001
data,
BO01
Laptops 9.15%
(d) Under the Basics
of DAX: Develop a sound grasp of DAX (Data
Analvsis BO02
Tables 14.15%
fully leverage its analytical capabilities, such as create dynamic measures, EApres Chairs 15.50%
and perform complex data transformations. calculated. CO01
CO02 8.25%
(e) Refresh data: Configure data connections to enable automatic refresh of data Product Name
intervals to ensure that the data remains current and accurate, sources at peig ProductID
Dishwasher
Product Category
Tet us understand how to work with Power Pivot with the help of an example. A001 Apliances
Cooking Stove
Example 4.2: You are provided with the consolidated sales data ofAlpha Ltd. in an A002
Mobile Devices
Appliances
excel workbo. B001
Electronics
Product ID Product Name Qty Sold Price per unit Month Laptops Electronics
A001 Dishwasher 250 14500
February
Reglon BO02
Tables
Funiture
A001 Dishwasher 540 12900
East CO0!
Chairs
February Fumiture
A001 Dishwasher 800
West CO02
to:
13500 required
June
South Pivot, you are
A001 Dishwasher Power.
A002
March South ()
a Pivot Chart to displaythe Total Proft of the four regions.
Cooking Stove 850 6900 Prepare
Chart with Month and Region slicers tto display the Sales (in terms of quantities
May East ()
B001 Mobile Devices 490 45000 Prepare a Pivot
April West
B001 Mobile Devices 690 36500 sold) ofall products.
January South the profitability of all products.
B0O1 Mobile Devices 1270 21900 June East
A Create a KPIvisual to track
B001 Mobile Devices 1100 22900 March North Solution:
BO02
Laptops may perform the following steps:
la) To create a PowerPivot table, the analyst
220 33500 April West
B002
Laptops 370 28900 January North Open anew Excel workbook. Add the Power Pivot Add-in (ifnot already added) by following
B002
Laptops 460 36900 March East the steps outlined in the previous section.
B002 windoW. Pivot
Laptops 375 click on Manage to launch the Power
Navigate to the Power Pivot tab and
25700 May South
euMMARIZATIONAND ANALYTICS IN SPREADSHEET
418
Click on
Chart
Styles to
sclcctthe, Style
navigate tothe
and Color of the
PivoLChart.
PivotChart Analyze tab,
BUSIHES Tables
270
6575 4.19
PivotChart,
Check the
With an active dialog box. boxes against the Cick
requircd. Tables
455
1500 April
Jaunch the
OK.
Insert Sliccr
Pivot
on\nser Tables
Tables
350
475
1740
4590
April
February
East
West
Effective Use
ofPower 1275 March Soth
Guidelines for Power Pivot as tool for Chairs
10300 North
the potential of data modeling and 800
1700 Janiary East
effèctively leverage outlined below:
Chairs
To C002
740 June
mayfollow the
guidelines
1300
8500
9200
March
North
South
() Import and
organize it systematically
before importing it. remove C02
Chairs
March
the data and imported data tables
inconsist. provided with the profit margin sheet and the product name and West
Data Model: Identify and link category
workbooks.
Äata and using primary kev mapoing
excel
Optimize redundant also
COO2
Chairs
15.50%
8.25%
Product Name
(e) Refresh data: Configure data connections to enable automatic refresh of data s Product Category
intervals to ensure that the data remains current and accurate. Sources a peiok Product D
Dishwasher
Appliances
Let us understand how to work with Power Pivot with the help of an example.
A001
Cooking Stove
Appliances
Mobile Devices
Example 4.2: You are provided with the consolidated sales data ofAlpha Ltd. in an excel
A002
Electronics
Product ID Product Name Qty Sold Price per unit Month
wotkbos B001
Laptops Electronics
A001 Dishwasher 250 14500 Region BO02
Tables Fumiture
February East C001
Chairs
A001 Dishwasher 540 12900 Furniture
February West CO02
A001 Dishwasher 800 13500 June Pivot, you are required to:
South
table using the Product ID field as the key column.
Power.
the Excel
filefrom Click on Next. From the Preview box the the Apply
Pivot window.
Curreney Format
section,
o 4 T A
row as
column
therelevant
tables in
Total Sales
and Total Profit of all the
Soure Tableto
include product categories, the following steps
imported.dick on by
from which data he
Excel files is to be Topresent
t h e
ProfitMargin.
Navigate
PivotSelect New
window.
Iothe Home tab of the Power Pivot window. click on Diagram View click on OK. Rename this
. then
PivotTable output sheet as
SalesDataAnalysis.
Worksheet,
data model. Fields section, expand the SalesData
(including headers) in the
PivotTable
Average
for Appliances in these two regions.
Profits
alesData
ProfitMargin E
PivotTable Felds
B
Product |D D Product ID
Product Category
Appliances
Acn A
Profit
Average of Total Sales Average of Total
Product Name Ooose ldds to add to °po.
Product Name R o wl a b e l s
47,45,000.00 5,66,600.00
Qty Sold A Profit Margin (% of 83,.13.000.00 9,94,192,50
West
Month
Reglon Drag flcds beton bo
ProductMapping
TRers
Product |D Produa Ctagory
1
Product Name Rws
Recioe
Product_Category
15
SolsDataAnalysis Sheet1
(b) To compute the Total Sales and Total Profit PivotChart displayingthe Total Profits of all four regions, theanalyst may perform
for Toprepare a
all the sales data, the analyst may perfom the (d) the
following steps: following steps:
Click on Data View. Navigate to the SalesData Navigate to the Home tab ofthe Power Pivot window, then click on PivotTable> PivotChart
sheet. Click on the Add Column heade,
then navigate to the function bar. By selecting the appropriate to launch the Create PivotChart dialog box. Select either New Worksheet or Existing
sheet, enter the function: -SalesData[Qty column headers in SalesData Worksheet as the output table destination, then click on OK.
Soldj*SalesData(Price
Rename this Calculated Column 1as Total Sales". per unit]. Press Enter. Expand the data sources by clicking on the arrows to the left of
thedata source table names
Click on the Add Column header, then navigate in the PivotChart Fields.
to the function bar. By selecting the under the Values area, and place
appropriate column headers from the SalesData and ProfitMargin
sheets, enter the function: " Drag and place the Total Profits field of the SalesData table
-SalesData[Total Sales]*ProfitMargin(Sum of Profit Margin (% of Sales)]. Press the Region field under the Axis (Categories) area.
Rename this Calculated Column as Total Enter.
Profit. Format the Pivot Chart using the Chart Elements and Chart Style options.
4.23
Measures > New Measure. In the Measure dialog
K M
the following
formula in the formula section:bOx, input the
measure narne
PivotChanFlelds
and
on
TotalProfit
otick
=sumx(SalesData.sSales Data[Sum of Total 1Profit])
ear 2023
for thbe Chone validatethe formula.
Itel Profis as to Sclect the Category as
Check
Formula
Currency. then click
(E91 on
Product_Name field under Rows and the newly
the
created
TotalProfit field and chck TotalProfit
Click
place
Values. Click
on the dropdown of the
on Value
onOK.
and
Drag
u n d e r
onthe
Click "Show Values: as" tab, and select %of Grand Total. Click
measure
S e t t i n g s .
values as percentages of Total Cost (Overall).
TotalProfit
on
the
Field d i s p l a y
Drag the to define the KPI thresholds. In this case, the lower
Sheet1 NDefer yot Updele Sndlon the
KPI
85,00,000)
whereas the upper bound is
oChar2
AeChart
SalesDalanalysis
as (say, at17,00,000, set at 39,00,000. Select an lcon
(e) To prepare a Pivot Chart with a slicer to display the Sales (in terms of quantities value
is
set OK
bound
click
on
following steps:
products, the analyst may perform the
then Indicator
(KP)
Style,
Pivot window. then. click on
Perfornnance
Key
tab of the Power
Navigateto the Home
to launch the Create PivotChart dialog box. Select either New PivotTable> Pivso KPI base
hold
aue)
TolaProft
Worksheet as the output table destination, then click on OK Define target value:
Expand the data sources by clicking on the arrows to the left of the data O M a z s u r e :
source table O
Absdle
value
8500000
Drag and place the Qty Sold field of the SalesDatatable under the Values
the Product Name field under the Axis (Categories) area. area, and npa 170000 3900000
Format the Pivot Chart using the Chart Elements and Chart Style options Taget
Click on the PivotChart, then navigate to the PivotChart Analyze tab. Click
on
Slicer. Select Month and Region, then click on OK to insert the slicers for these f Inse Select ioon style.
D EFG H KL M
N
PivotChart Fields
Month Actve AR
Total products sold in the year 2023
Choose felds to add to report
a Desaipbons
South RowLbo
K 30,97,256 R85,00000
W , Product Name Sum of Qty Sok Chalrs R33,15,827 85,O0,00
Cooking S t a v e
R35,59,973 85,
MvotChrt2 PvorChart SalesDataAnalysis Sheet1 sher
Dishwash
ODefer Lyout Update 63,21442
K97,73,205
REoo.000 Dsvelue (TotalProfk)
Mobile Devices K8s00,000 oal
() To create a KPI visual of profitability of all products, the analyst Tables
K15,61,935. 8S.O0000
steps:
may perform the following GrandTotal
R2,76,29,637
Drag fields betw ary belrw
Navigate to the Power Pivot tab and click on Manage to launch the Power Pivot
window.
" On the Home tab, click on PivotTable to launch the Create ROw
Worksheet, then click on OK. Rename this PivotTable output sheet as KPI
Since KPIs in Power Pivot only work with measures, navigate to
Tracker.
the Power Pivot tab and
USNES
Conchson
is an
invalabie
toolfor tavanced data analysis and
Pvot its powertül
h
Power
briel,
outlinecdsteps
andlevernging
eatures, analysts
ollowigthe compler
data models, periom intricate
create
lage
dhtasets,
empowers
Ihis
USGrS to deeper insights, thereby ma
uncover
viuslizations.
inteligence anddata-divenn decision-making,
for busines
lool
Aental
View)
Bl(ormerlyPower
424 Power enables
data
technology
visualization that
Power Viewis a
mative dashboards and reports. Power View was Drevin