DATA Analytics
DATA Analytics
TABLE : 1
OUTPUT:
2Q: Format the Employee Name column.
Syntax: Go to tool bar > Select Data > Select From Table/Range >
Select column for formatting (Employee Name) > Transform >
Text column > Format > Capatalize each word option > Apply
OUTPUT:
3Q: Format the Gender column.
Syntax: Go to tool bar > Select Data > Select From Table/Range >
Select column for formatting(Gender) > Transform > Text Column >
Format > LowerCase > Apply
OUTPUT:
4Q: Format the date to “MM/DD/YYYY”
Syntax: Go to tool bar > Select Data > Select From Table/Range >
Ok > Transform > Data Type > Select Date > Select the Date of Hiring
column > Calender symbol which is present in the left of column name > Using
Locale > In Locale Select English(United-States) > Click on Ok
OUTPUT:
5Q: Find the Number of years of service
of service for an employee in the
organisation as on date.
Syntax: Go to tool bar > Select Data > Select From Table/Range >
Ok > Add Column > Date (Drop Down) > Select Age >
Duration (DropDown) > Select Years > Click on Left Side Symbol of
Year of Services > Click on Whole number
For rounding: Transform > click on rounding > roundup
OUTPUT:
6Q: Insert the currency “$” symbol in the salary
column.
Syntax: Go to tool bar > Select Data > Select From Table/Range >
Ok > Select Salary Column > Click on 123 symbol > Select $ Symbol
Curreny
OUTPUT:
OUTPUT:
Output:
No. of Months of
Date of Hiring Service
01-06-2006 234
01-02-2007 226
08-06-2005 246
01-03-2010 189
10-04-2014 140
21-09-2012 159
23-10-2013 146
12-02-2008 214
16-05-2016 115
01-09-2008 207
OUTPUT:
Date of Hiring Salary No. of Months of Service Years of Service Bonus paid
01-06-2006 45000 234 19.5 4500
01-02-2007 25000 226 18.83333333 2500
08-06-2005 24000 246 20.5 2400
01-03-2010 22000 189 15.75 2200
10-04-2014 20001 140 11.66666667 2000
21-09-2012 15800 159 13.25 1580
23-10-2013 20345 146 12.16666667 2034
12-02-2008 35789 214 17.83333333 3579
16-05-2016 28349 115 9.583333333 0
01-09-2008 30000 207 17.25 3000
OUTPUT:
Total
Deptname No. of Employees Salary
D 2 75000
HR 3 60801
S 4 108483
O 1 22000
TABLE 2
Employe First Last Gender Age Date of Hiring Salary
e
ID Name Name M/F (Years) (DD-MM-YYYY) (In $)
45001 anne hardy F 45 06-01-2010 4,50,000
45001 Ram sastry M 23 01-05-2000 1,25,000
45203 SHYAM max M 35 01-08-2005 2,15,000
45932 Riya sharma F 29 01-03-2010 2,12,000
45020 Jai dixit M 48 08-10-2000 4,65,000
Syntax: Ms excel: Data > New query > Combined Query > Launch
Power Query > New Source > File > Open.
To highlight blank cells & fill with no data:
Select all rows and columns > Data type > Text > Under transform >
Replace Values > Value to find: null to Replace with: no data > enter ok.
OUTPUT
Syntax: Ms excel: Data > New query > Combined Query > Launch
Power Query > New Source > File > Open.
To concatenate First Name and Last Name columns:
Select first name & last name columns > Transform > Merge columns
> Separator: space & New column name: Full name > Ok.
OUTPUT
14Q. Format the names of the concatenated column.
Syntax: Ms excel: Data > New query > Combined Query > Launch
Power Query > New Source > File > Open.
To format the names of the concatenated column:
Select full name column > Format > Capitalised each word.
OUTPUT
TABLE 3
3124 Alfreds Futterkiste Maria Obere Str. 57, Berlin 1220 Germany
Anders 9
5678 Around the Horn thomas 120 Hanover Sq. NY WA1 USA
hardy 1DP
OUTPUT:
19) From the above table remove the duplicate
rows.
SYNTAX: MS Excel → DATA → New query → Combine
query→ Launch power query → New Source → File → Excel
→ File Name → Opens POWER QUERY EDITOR
HOW TO REMOVE DUPLICATE ROWS
Go to tool bar → Home → Remove Rows → Remove
Duplicate
OUTPUT:
Employee
Employee Gender Age Year of Date of Salary
As on In
ID Na M/F Graduation Hiring
date Rupees
me
Source = Excel.CurrentWorkbook(){[Name="Table6"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text},
{"Column2", type text}, {"Column3", type text}, {"Column4", type any}, {"Column5",
type any}, {"Column6", type any}, {"Column7", type any}}),
Headers=
Record.FromList(List.Transform(Table.ToColumns(Table.FirstN(Source,2)),
each Text.Combine(_," ")), Table.ColumnNames(Source)),
OutputTable=Table.InsertRows(Table.Skip(Source,2),0,{Headers}),
in
#"Changed Type1"
Output:
21.From the above data in Excel, convert the numerals in Year column to text
format.
Solution:
Go to Data Select From Table/RangeSelect the Table in Excel Active Sheet
Change Column Type:
Right click on Date of Hiring column Heading Select Change Type Select Text
25.Create Email Addresses using lower case and underscore in between the
names and end with “@gmail.com”. (For example
[email protected])
Solution:
Go to Data Select From Table/RangeSelect the Table in Excel Active Sheet
To Create Email Address:
Go to AddColumnSelect the Custom Column Under New Column Name
“Email_address” and in Custom Column Formula =
Text.Combine( {Text.Replace(Text.Lower([Employee2 Name]),"
","_"),"@gmail.com"})
Click OK.
OUTPUT:
II. Table for 26 to 30 Questions:
Address
, City,
State,
Phone ZIP Shipme Order
Customer Name Company name number Code Amount nt Date Date
939
clear
edge,
mesita,
Stokes, Rutherford 7282727 wv, $ 25-05- 2016-
Jim van der Mheen and Bauch 491 14424 1,00,003 2016 04-19
873 iron
third
harbor,
whelen
springs,
2676259 nm, 02-08- 2016-
Shenita Daven port Waelchi Inc 210 37783 1,83,593 2016 07-03
856
forge
Braun, Crooks and 8373183 overpas 30-10- 2016-
Jimmie Mc Clure Ortiz 928 s, 1,59,194 2016 10-21
annand
ale, nm,
08463
515
silver
highlan
ds,
natalba
Schamberger, Yost 8853887 ny, wy, 20-04- 2016-
Mary Belle Serrano and Dach 212 00462 1,80,394 2016 04-01
221
jagged
harbor,
franklin
borough
Mann, Sauer and 3507306 , ny, 10-08- 2016-
Vito van Helpen Sauer 802 80069 1,25,979 2016 07-18
p.o. box
51573,
berthold
Salvatore Van 5308189 , sd, 30-08- 2016-
Egmond Schmidt-Marks 072 16229 1,11,804 2016 07-29
p.o. box
42524,
matteso
n
village,
Huels, Schuster 8102106 mn, 25-02- 2016-
Hay Wood Meza and Daugherty 924 55503 1,08,063 2016 01-15
249 old
passage
, james
village,
8661697 id, 05-08- 2017-
Margrett Cowan Armstrong Group 766 64602 1,74,882 2017 07-15
843 old
camp,
new
holland
village,
Muller, Lakin and 9291511 wy, 05-04- 2017-
Jerold MC Hooper Bogan 240 32125 1,30,140 2017 03-26
956 lazy
grove,
ouray,
Leandro van der 6714529 mi, 18-03- 2017-
Woerd Mueller and Sons 8l3 38713 2,12,181 2017 01-18
p.o. box
30184,
wolfe,
Braun, Crooks and 7702510 ok, 20-06- 2017-
Haywood Huber Ortiz 897 08774 1,52,568 2017 05-31
897
amber
bluff,
huntley,
8041074 in, 08-08- 2017-
Particia Veen Hof Schmidt-Marks 292 29911 1,52,088 2017 08-02
Yvone Esparza Weber, Kuhlman 2099450 937 13-12- 2017-
Brook and Hirthe 674 indian 1,85,383 2017 12-05
kennedy
lawn,
south
milwau
kee, me,
85635
670 lazy
cider,
glen
raven,
Weber, Kuhlman 6161698 nc, 2017- 2017-
Yvone Esparza and Hirthe 5o2 19967 1,39,493 05-30 04-30
370
eighth
mews,
villano
beach,
Graham, Towne 4729853 nv, 2017- 2017-
Jame Oosthuijzen and Monahan 826 52255 1,83,377 09-20 09-07
325 iron
bluff
heights,
walford,
8756599 vt, 2017- 2017-
Filiberto Kues Schmidt-Marks 072 11877 1,98,796 05-20 05-16
27. From the above table, put the phone numbers in US format.
Solution:
1.Go to Data Select From Table/RangeSelect the Table in Excel Active
Sheet
2. Remove other columns of the Data table
Select the Phone number Column Go to HomeSelect Remove
Columns under Manage Columns Select Remove Other
Columns.
3. Split First ‘3’ characters of Phone number
Right Click on Phone number Column select Change Type
Select Text
Go to Home Select Split Column Select ‘By Number of
Characters Enter ‘Number of Characters” as ‘3’ and Select
‘Once, as far left as Possible’ Click OK.
Change Type of both Columns to ‘Text’
4. Split First ‘3’ characters of Phone number
Select the Second ColumnGo to Home Select Split Column
Select ‘By Number of Characters Enter ‘Number of
Characters” as ‘3’ and Select ‘Once, as far left as Possible’
Click OK.
Double click on the column name and Change the title of the
Column to “ First Name”
Double click on the column name and Change the title of the
Column to “ First Name”
OUTPUT:
Customer Name FirstName Last_Name Middle_Name
Jim vander Mheen Jim Mheen vander
Shenita Daven port Shenita port Daven
Jimmie Mc Clure Jimmie Clure Mc
Mary Belle Serrano Mary Serrano Belle
Vito van Helpen Vito Helpen van
Salvatore Van
Egmond Salvatore Egmond Van
Hay Wood Meza Hay Meza Wood
Margrett Cowan Margrett Cowan
Jerold MC Hooper Jerold Hooper MC
Leandro van der
Woerd Leandro Woerd van der
Haywood Huber Haywood Huber
Particia Veen Hof Particia Hof Veen
Yvone Esparza Brook Yvone Brook Esparza
Yvone Esparza Yvone Esparza
Jame Oosthuijzen Jame Oosthuijzen
Filiberto Kues Filiberto Kues
30. From the above table, calculate the number of days required for
shipment.
Solution:
Go to Data Select From Table/RangeSelect the Table in Excel Active
Sheet
Change Type of the Column:
Right click on Shipment Date Column Heading Select Change Type
Select Date
Right click on Order Date Column Heading Select Change Type Select
Date
Output:
6TH TABLE
Power Pivot and Power Query Questions:
OUTPUT
32. Split the column Customer ID into Customer ID
and Customer Name.
SYNTAX :
Select customer ID column > Go to home > spilt
column > click on by delimiter > select comma &
each occurance of delimiter > click ok.
OUTPUT :
7TH TABLE
Power Query and Power Pivot Link (Sales_2018)
Power Query and Power Pivot Link (Sales_ 2019)