0% found this document useful (0 votes)
7 views

Lab BA 3 Sem Programs

record

Uploaded by

psaritha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lab BA 3 Sem Programs

record

Uploaded by

psaritha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

MS Excel or Power query

1. Table for 1-10 Questions

Deptname–
EmpID Employee Name Gender Date of Birth Date of Hiring Salary
D–45001 anne hardy F 03-01-1977 01-06-2006 45,000.00
HR–45001 RAM Sastry m 23-04-1999 01-02-2007 25,000.00
S–45203 syam mohan m 30-11-1987 06-08-2005 24,000.00
O–45301 riya SHAarma f 29-05-1993 13-01-2010 22,000.00
HR–45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR–45010 jack McGinnis M 04-06-1988 21-09-2012 15,800.00
S–45210 soe green m 20-08-1982 15-11-2013 20,345.00
S–45230 mc george M 22-11-1994 15-05-2016 28,349.00
D–45004 sam peter F 13-02-1984 01-09-2008 30,000.00
D – 45004 madhuri Dev F 13-02-1984 01-09-2008 30,000.00

1. Split the column Department –Emp. ID into two columns.


Step 1: Insert a column after Deptname-EmpID
Step 2: Select the first column and click on Data→Text to columns
Step 3: Select Delimited click on Next
Step 4: Select Other (-) option and click on Finish

Output:

Employee Date of Date of


Deptname EmpID Name Gender Birth Hiring Salary
D 45001 anne hardy F 03-01-1977 01-06-2006 45,000.00
HR 45001 RAM Sastry m 23-04-1999 01-02-2007 25,000.00
S 45203 syam mohan m 30-11-1987 06-08-2005 24,000.00
O 45301 riya SHAarma f 29-05-1993 13-01-2010 22,000.00
HR 45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR 45010 jack McGinnis M 04-06-1988 21-09-2012 15,800.00
S 45210 soe green m 20-08-1982 15-11-2013 20,345.00
S 45230 mc george M 22-11-1994 15-05-2016 28,349.00
D 45004 sam peter F 13-02-1984 01-09-2008 30,000.00
D 45004 Madhuri Dev F 13-02-1984 01-09-2008 30,000.00
2. Format the Employee Name column.

Use the function =PROPER(Employee Name)


Output:

Date of
Deptname EmpID Employee Name Gender Date of Birth Hiring Salary
D 45001 Anne Hardy F 03-01-1977 01-06-2006 45,000.00
HR 45001 Ram Sastry m 23-04-1999 01-02-2007 25,000.00
S 45203 Syam Mohan m 30-11-1987 06-08-2005 24,000.00
O 45301 Riya Shaarma f 29-05-1993 13-01-2010 22,000.00
HR 45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 15,800.00
S 45210 Soe Green m 20-08-1982 15-11-2013 20,345.00
S 45230 Mc George M 22-11-1994 15-05-2016 28,349.00
D 45004 Sam Peter F 13-02-1984 01-09-2008 30,000.00
D 45004 Madhuri F 13-02-1984 01-09-2008 30,000.00

3. Format the Gender column.

Employee Date of
Deptname EmpID Name Gender Date of Birth Hiring Salary
D 45001 Anne Hardy F 03-01-1977 01-06-2006 45,000.00
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 25,000.00
S 45203 Syam Mohan M 30-11-1987 06-08-2005 24,000.00
O 45301 Riya Shaarma F 29-05-1993 13-01-2010 22,000.00
HR 45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 15,800.00
S 45210 Soe Green M 20-08-1982 15-11-2013 20,345.00
S 45230 Mc George M 22-11-1994 15-05-2016 28,349.00
D 45004 Sam Peter F 13-02-1984 01-09-2008 30,000.00
D 45004 Madhuri F 13-02-1984 01-09-2008 30,000.00

4. Format the date to YYYY/MM/DD

1. Select the Date of Birth and Date of Hiring columns.


2. Go to custom format and enter the date format to YYYY/MM/DD

Output:

Employee Date of Date of


Deptname EmpID Name Gender Birth Hiring Salary
D 45001 Anne Hardy F 1977/01/03 2006/06/01 45,000.00
HR 45001 Ram Sastry M 1999/04/23 2007/02/01 25,000.00
S 45203 Syam Mohan M 1987/11/30 2005/08/06 24,000.00
O 45301 Riya Shaarma F 1993/05/29 2010/01/13 22,000.00
HR 45005 John Doe M 1997/09/25 2014/10/28 20,001.00
HR 45010 Jack Mcginnis M 1988/06/04 2012/09/21 15,800.00
S 45210 Soe Green M 1982/08/20 2013/11/15 20,345.00
S 45230 Mc George M 1994/11/22 2016/05/15 28,349.00
D 45004 Sam Peter F 1984/02/13 2008/09/01 30,000.00
D 45004 Madhuri F 1984/02/13 2008/09/01 30,000.00

5. Find the Number of years of service of service for an employee in the organisation as on
date.

Use the function =DATEDIF(Date of Hiring,Today(),”Y”)

Output:

Employee Date of Date of Years of


Deptname EmpID Name Gender Birth Hiring Salary Sevice
D 45001 Anne Hardy F 03-01-1977 01-06-2006 45,000.00 18
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 25,000.00 17
S 45203 Syam Mohan M 30-11-1987 06-08-2005 24,000.00 19
O 45301 Riya Shaarma F 29-05-1993 13-01-2010 22,000.00 14
HR 45005 John Doe M 25-09-1997 28-10-2014 20,001.00 10
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 15,800.00 12
S 45210 Soe Green M 20-08-1982 15-11-2013 20,345.00 10
S 45230 Mc George M 22-11-1994 15-05-2016 28,349.00 8
D 45004 Sam Peter F 13-02-1984 01-09-2008 30,000.00 16
D 45004 Madhuri F 13-02-1984 01-09-2008 30,000.00 16

6. Insert the currency “$” symbol in the salary column.

Output:

Employee Date of Years of


Deptname EmpID Name Gender Date of Birth Hiring Salary Sevice
D 45001 Anne Hardy F 03-01-1977 01-06-2006 $ 45,000.00 18
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 $ 25,000.00 17
S 45203 Syam Mohan M 30-11-1987 06-08-2005 $ 24,000.00 19
O 45301 Riya Shaarma F 29-05-1993 13-01-2010 $ 22,000.00 14
HR 45005 John Doe M 25-09-1997 28-10-2014 $ 20,001.00 10
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 $ 15,800.00 12
S 45210 Soe Green M 20-08-1982 15-11-2013 $ 20,345.00 10
S 45230 Mc George M 22-11-1994 15-05-2016 $ 28,349.00 8
D 45004 Sam Peter F 13-02-1984 01-09-2008 $ 30,000.00 16
D 45004 Madhuri F 13-02-1984 01-09-2008 $ 30,000.00 16

7. Remove the decimal place in the salary column.

Employee Date of Date of Years of


Deptname EmpID Name Gender Birth Hiring Salary Sevice
D 45001 Anne Hardy F 03-01-1977 01-06-2006 $ 45,000 18
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 $ 25,000 17
S 45203 Syam Mohan M 30-11-1987 06-08-2005 $ 24,000 19
O 45301 Riya Shaarma F 29-05-1993 13-01-2010 $ 22,000 14
HR 45005 John Doe M 25-09-1997 28-10-2014 $ 20,001 10
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 $ 15,800 12
S 45210 Soe Green M 20-08-1982 15-11-2013 $ 20,345 10
S 45230 Mc George M 22-11-1994 15-05-2016 $ 28,349 8
D 45004 Sam Peter F 13-02-1984 01-09-2008 $ 30,000 16
D 45004 Madhuri F 13-02-1984 01-09-2008 $ 30,000 16

8. If an employee has to retire at the age of 60, when will they retire.

Dept Employee Date of Date of Years of


name EmpID Name Gender Birth Hiring Salary Sevice Bonus
D 45001 Anne Hardy F 03-01-1977 01-06-2006 $ 5,000 18 $4,500
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 $ 5,000 17 $2,500

S 45203 Syam Mohan M 30-11-1987 06-08-2005 $24,000 19 $ 2,400

O 45301 Riya Shaarma F 29-05-1993 13-01-2010 $22,000 14 $2,200


No
Sufficient
HR 45005 John Doe M 25-09-1997 28-10-2014 $20,001 10 Experience

HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 $15,800 12 $1,580


No
Sufficient
S 45210 Soe Green M 20-08-1982 15-11-2013 $20,345 10 Experience
No
Sufficient
S 45230 Mc George M 22-11-1994 15-05-2016 $28,349 8 Experience

D 45004 Sam Peter F 13-02-1984 01-09-2008 $30,000 16 $3,000

D 45004 Madhuri F 13-02-1984 01-09-2008 $30,000 16 $3,000

9. Employees whose experience is greater than 10 years will get a bonus of 10%. Calculate
the bonus paid.

Dept Employee Date of Date of Years of


name EmpID Name Gender Birth Hiring Salary Sevice Bonus
D 45001 Anne Hardy F 03-01-1977 01-06-2006 $ 5,000 18 $4,500
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 $ 5,000 17 $2,500

S 45203 Syam Mohan M 30-11-1987 06-08-2005 $24,000 19 $ 2,400

O 45301 Riya Shaarma F 29-05-1993 13-01-2010 $22,000 14 $2,200


No
Sufficient
HR 45005 John Doe M 25-09-1997 28-10-2014 $20,001 10 Experience

HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 $15,800 12 $1,580


No
Sufficient
S 45210 Soe Green M 20-08-1982 15-11-2013 $20,345 10 Experience
No
Sufficient
S 45230 Mc George M 22-11-1994 15-05-2016 $28,349 8 Experience

D 45004 Sam Peter F 13-02-1984 01-09-2008 $30,000 16 $3,000

D 45004 Madhuri F 13-02-1984 01-09-2008 $30,000 16 $3,000

10. How many employees are there in each department and what is their total salary
department wise.
1. To get Department Name use the function =unique(Deptname)
2. To get Number of Employees in each department use the function
=COUNTIF($A$2:$A$11,C15)
3. To get Total Salary Department Wise use the function
=SUMIF($A$2:$A$11,C15#,$G$2:$G$11)

Department No of Employees in each


Name Department Total Salary
D 3 105000
HR 3 60801
S 3 72694
O 1 22000
I I. Table for 11-15 Questions

Date of Hiring Salary in


Employee ID First Name Gender (M/F) Age(Years) (DD/MM/YYYY) $
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

Madhuri
45006 dEv F 38 3,10,000
Somya
45078 Varma F 56 01-10-1990 6,50,000
45039 Raju beri M 43 02-08-1999 4,23,000

45020 Jai dixit M 48 08-10-2000 4,65,000


45038 Kalyani rao F 37 03-10-2010 3,12,000
45037 Sam joseph M 4 04-02-2006
Poter
45059 Parker M 39 03-10-2008 2,89,000
45012 Siddu rao M 42 15-10-2007 4,12,000

11. Concatenate First Name and Last Name columns

Employee Gender Date of Hiring Salary in


ID First Name (M/F) Age(Years) (DD/MM/YYYY) $
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

Madhuri
45006 dEv F 38 3,10,000
Somya
45078 Varma F 56 01-10-1990 6,50,000
45039 Raju beri M 43 02-08-1999 4,23,000

45020 Jai dixit M 48 08-10-2000 4,65,000


45038 Kalyani rao F 37 03-10-2010 3,12,000
45037 Sam joseph M 4 04-02-2006
Poter
45059 Parker M 39 03-10-2008 2,89,000
45012 Siddu rao M 42 15-10-2007 4,12,000
12. Remove blank rows
Open the file in Power Query Editor. Use Remove blanks rows to delete the blank rows.

Employee Gender Date of Hiring


ID First Name (M/F) Age(Years) (DD/MM/YYYY) Salary 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
45006 Madhuri dEv F 38 3,10,000
45078 Somya Varma F 56 01-10-1990 6,50,000
45039 Raju beri M 43 02-08-1999 4,23,000
45020 Jai dixit M 48 08-10-2000 4,65,000
45038 Kalyani rao F 37 03-10-2010 3,12,000
45037 Sam joseph M 04-02-2006 3,20,000
45059 Poter Parker M 39 03-10-2008 2,89,000
45012 Siddu rao M 42 15-10-2007 4,12,000

13. Highlight blank cells and fill with “No Data”


Open the file in Power Query Editor. Use Replace Blanks with No Data

Employee Gender Date of Hiring


ID First Name (M/F) Age(Years) (DD/MM/YYYY) Salary 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
45006 Madhuri dEv F 38 No Data 3,10,000
45078 Somya Varma F 56 01-10-1990 6,50,000
45039 Raju beri M 43 02-08-1999 4,23,000
45020 Jai dixit M 48 08-10-2000 4,65,000
45038 Kalyani rao F 37 03-10-2010 3,12,000
45037 Sam joseph M No Data 04-02-2006 3,20,000
45059 Poter Parker M 39 03-10-2008 2,89,000
45012 Siddu rao M 42 15-10-2007 4,12,000

14. Format the names of the concatenated column.

Employee Gender Date of Hiring


ID First Name (M/F) Age(Years) (DD/MM/YYYY) Salary 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
45006 Madhuri Dev F 38 No Data 3,10,000
45078 Somya Varma F 56 01-10-1990 6,50,000
45039 Raju Beri M 43 02-08-1999 4,23,000
45020 Jai Dixit M 48 08-10-2000 4,65,000
45038 Kalyani Rao F 37 03-10-2010 3,12,000
45037 Sam Joseph M No Data 04-02-2006 3,20,000
45059 Poter Parker M 39 03-10-2008 2,89,000
45012 Siddu Rao M 42 15-10-2007 4,12,000

15. List out all the employees whose salary is greater than $3,00,000 and less than $4,00,000
give allowances of 5% and above $4,00,000 give allowances of 10%. Find the total
allowances paid by the company.

Employee Gender Date of Hiring


ID First Name (M/F) Age(Years) (DD/MM/YYYY) Salary in $ Allowance
45001 Anne Hardy F 45 06-01-2010 4,50,000 45000
45001 Ram Sastry M 23 01-05-2000 1,25,000 No Allowance
45203 Shyam Max M 35 01-08-2005 2,15,000 No Allowance
45932 Riya Sharma F 29 01-03-2010 2,12,000 No Allowance
45020 Jai Dixit M 48 08-10-2000 4,65,000 46500
45006 Madhuri Dev F 38 3,10,000 15500
45078 Somya Varma F 56 01-10-1990 6,50,000 65000
45039 Raju Beri M 43 02-08-1999 4,23,000 42300
45020 Jai Dixit M 48 08-10-2000 4,65,000 46500
45038 Kalyani Rao F 37 03-10-2010 3,12,000 15600
45037 Sam Joseph M 04-02-2006 3,20,000 16000
45059 Poter Parker M 39 03-10-2008 2,89,000 No Allowance
45012 Siddu Rao M 42 15-10-2007 4,12,000 41200
Total Allowance 333600
III. Table for Question No. 16-20

Customer Postal
ID Customer Name Contact Name Street Name City Code Country
Alfreds
3124 Futterkiste Maria Anders Obere Str. 57, Berlin 12209 Germany
avda. de la
Ana Trujillo Constituci¢n Mexico
1238 helados Ana Trujillo 2222 city 5021 Mexico
Antonio Mexico
4562 MorenoTaquer¡a antonio moreno mataderos 2312 city 5023 Mexico
new
678 Around the Horn thomas hardy 120 Hanover Sq. yoork WA1 1DP USA
Christina Berguvsv„gen 8
2314 Berglunds snabola Berglund Sydney Sydney 33-22 Australia
3657 Amit Mishra Maria Anders Obere Str. 57 Sydney 65 332-3 Australia
Avda. de la
Constitucion
7890 williami sanuo Ana Trujillo 2222 Sydney 43433 Australia
Antonio 120 Jefferson new
56789 Sonio Moreno Moreno St.,Riverside jersy 8075 USA
3657 Amit Mishra Maria Anders Obere Str. 57 Sydney 65 332-3 Australia
Berglunds Christina Berguvsv„gen 8
2314 snabbkp Berglund Sydney Sydney 33-22 Australia

16. Using Excel, concatenate the columns Street name and city.
Function used =CONCATENATE(D2,"-",E2)
Ouput:

Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
Alfreds
3124 Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
Ana Trujillo avda. de la Constituci¢n 2222-
1238 helados Ana Trujillo Mexico city 5021 Mexico
Antonio
4562 MorenoTaquer¡a antonio moreno mataderos 2312-Mexico city 5023 Mexico
678 Around the Horn thomas hardy 120 Hanover Sq.-new yoork WA1 1DP USA
Berglunds Christina Berguvsv„gen 8 Sydney-
2314 snabola Berglund Sydney 33-22 Australia
3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la Constitucion
7890 williami sanuo Ana Trujillo 2222-Sydney 43433 Australia
Antonio 120 Jefferson St.,Riverside-
56789 Sonio Moreno Moreno new jersy 8075 USA
3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Berglunds Christina Berguvsv„gen 8 Sydney-
2314 snabbkp Berglund Sydney 33-22 Australia
17. Insert "C-" in the left side of the customer Id in customer name column of the above data.
Function Used : =CONCATENATE("C-",A2)
Output:

Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
C-3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
Ana Trujillo avda. de la Constituci¢n
C-1238 helados Ana Trujillo 2222-Mexico city 5021 Mexico
Antonio mataderos 2312-Mexico
C-4562 MorenoTaquer¡a antonio moreno city 5023 Mexico
C-678 Around the Horn thomas hardy 120 Hanover Sq.-new yoork WA1 1DP USA
Christina Berguvsv„gen 8 Sydney-
C-2314 Berglunds snabola Berglund Sydney 33-22 Australia
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la Constitucion
C-7890 williami sanuo Ana Trujillo 2222-Sydney 43433 Australia
Antonio 120 Jefferson St.,Riverside-
C-56789 Sonio Moreno Moreno new jersy 8075 USA
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Christina Berguvsv„gen 8 Sydney-
C-2314 Berglunds snabbkp Berglund Sydney 33-22 Australia

18. Using Excel Remove Extra spaces and format the names of customer name column.
Function Used: =Trim(Customer Name)
=proper(Customer Name)
Output:

Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
C-3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
avda. de la
Constituci¢n 2222-
C-1238 Ana Trujillo Helados Ana Trujillo Mexico city 5021 Mexico
Antonio mataderos 2312-
C-4562 Morenotaquer¡A antonio moreno Mexico city 5023 Mexico
120 Hanover Sq.-new
C-678 Around The Horn thomas hardy yoork WA1 1DP USA
Christina Berguvsv„gen 8
C-2314 Berglunds Snabola Berglund Sydney-Sydney 33-22 Australia
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la
Constitucion 2222-
C-7890 Williami Sanuo Ana Trujillo Sydney 43433 Australia
Antonio 120 Jefferson
C-56789 Sonio Moreno Moreno St.,Riverside-new jersy 8075 USA
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Christina Berguvsv„gen 8
C-2314 Berglunds Snabbkp Berglund Sydney-Sydney 33-22 Australia
19. From the above table remove the duplicate rows.
Procedure:
1. Select the data set.
2. Click on Data → Remove Duplicates
3. Click Select All
4. Duplicates rows will get deleted

Output:

Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
C-3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
avda. de la
Constituci¢n 2222-
C-1238 Ana Trujillo Helados Ana Trujillo Mexico city 5021 Mexico
Antonio mataderos 2312-
C-4562 Morenotaquer¡A antonio moreno Mexico city 5023 Mexico
120 Hanover Sq.-new
C-678 Around The Horn thomas hardy yoork WA1 1DP USA
Christina Berguvsv„gen 8
C-2314 Berglunds Snabola Berglund Sydney-Sydney 33-22 Australia
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la
Constitucion 2222-
C-7890 Williami Sanuo Ana Trujillo Sydney 43433 Australia
Antonio 120 Jefferson
C-56789 Sonio Moreno Moreno St.,Riverside-new jersy 8075 USA
Christina Berguvsv„gen 8
C-2314 Berglunds Snabbkp Berglund Sydney-Sydney 33-22 Australia

20. From the above table remove the customer whose customer ID is not a 4 digit number

Output:

Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
avda. de la
Constituci¢n 2222-
1238 Ana Trujillo Helados Ana Trujillo Mexico city 5021 Mexico
Antonio mataderos 2312-
4562 Morenotaquer¡A antonio moreno Mexico city 5023 Mexico
Christina Berguvsv„gen 8
2314 Berglunds Snabola Berglund Sydney-Sydney 33-22 Australia
3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la
Constitucion 2222-
7890 Williami Sanuo Ana Trujillo Sydney 43433 Australia
Christina Berguvsv„gen 8
2314 Berglunds Snabbkp Berglund Sydney-Sydney 33-22 Australia
IV. Table for Question No. 20-25

Employee Employee Gender Age Year of Date of Salary

ID Name (M/F) As on date Graduation Hiring In Rupees


D45078 Somya Rao F 50 1975 01-10-1990 6,50,000
S45039 Raju Budda M 43 2000 02-08-1999 4,23,000
M45020 Jai Raj M 48 1993 08-10-2000 4,65,000
M45038 Kalyani Kumari F 37 2004 3,12,000
M45037 Sam Joes M 36 2005 04-02-2006 3,20,000
S45059 Poter Michel M 39 2004 03-10-2008 2,89,000
Siddu
F45012 kommnani M 42 2000 15-10-2007 4,12,000
Geeta
F45023 Chowdari F 46 1996 12-10-2005 4,34,000
Lavanya
D45078 Koppula F 49 1994 31-10-2004
Hema Sarvani F 50 1992 25-10-2000 5,69,000
S45060 Gopal Das M 54 1998 12-09-2001 6,32,000
F45062 Siya Paul F 51 19-06-2003 5,90,000
M45026 Hari Krishna M 38 2003 25-04-2003
O45029 Priya Dixit F 27 2005 12-07-2006 3,45,000
A45037 Anu Devara F 58 1985 12-09-2008 6,95,000

21. From the above data in Excel, Concatenate the Headers.

Use the function =concatenate(A1,” “,A2)

Output:

Employee Employee Gender Age As on Year of Date of Salary in


ID Name (M/F) date Graduation Hiring Rupees
D45078 Somya Rao F 50 1975 01-10-1990 6,50,000
S45039 Raju Budda M 43 2000 02-08-1999 4,23,000
M45020 Jai Raj M 48 1993 08-10-2000 4,65,000
M45038 Kalyani Kumari F 37 2004 3,12,000
M45037 Sam Joes M 36 2005 04-02-2006 3,20,000
S45059 Poter Michel M 39 2004 03-10-2008 2,89,000
Siddu
F45012 kommnani M 42 2000 15-10-2007 4,12,000
Geeta
F45023 Chowdari F 46 1996 12-10-2005 4,34,000
Lavanya
D45078 Koppula F 49 1994 31-10-2004
Hema Sarvani F 50 1992 25-10-2000 5,69,000
S45060 Gopal Das M 54 1998 12-09-2001 6,32,000
F45062 Siya Paul F 51 19-06-2003 5,90,000
M45026 Hari Krishna M 38 2003 25-04-2003
O45029 Priya Dixit F 27 2005 12-07-2006 3,45,000
A45037 Anu Devara F 58 1985 12-09-2008 6,95,000

22. From the above data in Excel, convert the numerals in Year column to text format.

Procedure – Go to format and select Text

Ouput:

Employee Employee Gender Age As on Year of Date of Salary in


ID Name (M/F) date Graduation Hiring Rupees
D45078 Somya Rao F 50 1975 01-10-1990 6,50,000
S45039 Raju Budda M 43 2000 02-08-1999 4,23,000
M45020 Jai Raj M 48 1993 08-10-2000 4,65,000
M45038 Kalyani Kumari F 37 2004 3,12,000
M45037 Sam Joes M 36 2005 04-02-2006 3,20,000
S45059 Poter Michel M 39 2004 03-10-2008 2,89,000
Siddu
F45012 kommnani M 42 2000 15-10-2007 4,12,000
Geeta
F45023 Chowdari F 46 1996 12-10-2005 4,34,000
Lavanya
D45078 Koppula F 49 1994 31-10-2004
Hema Sarvani F 50 1992 25-10-2000 5,69,000
S45060 Gopal Das M 54 1998 12-09-2001 6,32,000
F45062 Siya Paul F 51 19-06-2003 5,90,000
M45026 Hari Krishna M 38 2003 25-04-2003
O45029 Priya Dixit F 27 2005 12-07-2006 3,45,000
A45037 Anu Devara F 58 1985 12-09-2008 6,95,000

23. From the above table in Excel, highlight the blank spaces and fill it with "Not Available".

Output:

Employee Employee Gender Age As on Year of Date of Salary in


ID Name (M/F) date Graduation Hiring Rupees
D45078 Somya Rao F 50 1975 01-10-1990 6,50,000
S45039 Raju Budda M 43 2000 02-08-1999 4,23,000
M45020 Jai Raj M 48 1993 08-10-2000 4,65,000
Not
M45038 Kalyani Kumari F 37 2004 Available 3,12,000
M45037 Sam Joes M 36 2005 04-02-2006 3,20,000
S45059 Poter Michel M 39 2004 03-10-2008 2,89,000
Siddu
F45012 kommnani M 42 2000 15-10-2007 4,12,000
Geeta
F45023 Chowdari F 46 1996 12-10-2005 4,34,000
Lavanya Not
D45078 Koppula F 49 1994 31-10-2004 Available
Not
Available Hema Sarvani F 50 1992 25-10-2000 5,69,000
S45060 Gopal Das M 54 1998 12-09-2001 6,32,000
Not
F45062 Siya Paul F 51 Available 19-06-2003 5,90,000
Not
M45026 Hari Krishna M 38 2003 25-04-2003 Available
O45029 Priya Dixit F 27 2005 12-07-2006 3,45,000
A45037 Anu Devara F 58 1985 12-09-2008 6,95,000

24. From the above table in Excel, select only the first name from the Employee name and paste in
another column.

Use text to column under Data Menu to split the Employee Name

Output:

Age
As
Employee Employee First Last Gender on Year of Date of Salary in
ID Name Name Name (M/F) date Graduation Hiring Rupees
D45078 Somya Rao Somya Rao F 50 1975 01-10-1990 6,50,000
S45039 Raju Budda Raju Budda M 43 2000 02-08-1999 4,23,000
M45020 Jai Raj Jai Raj M 48 1993 08-10-2000 4,65,000
Kalyani Not
M45038 Kumari Kalyani Kumari F 37 2004 Available 3,12,000
M45037 Sam Joes Sam Joes M 36 2005 04-02-2006 3,20,000
S45059 Poter Michel Poter Michel M 39 2004 03-10-2008 2,89,000
Siddu
F45012 kommnani Siddu kommnani M 42 2000 15-10-2007 4,12,000
Geeta
F45023 Chowdari Geeta Chowdari F 46 1996 12-10-2005 4,34,000
Lavanya Not
D45078 Koppula Lavanya Koppula F 49 1994 31-10-2004 Available
Not
Available Hema Sarvani Hema Sarvani F 50 1992 25-10-2000 5,69,000
S45060 Gopal Das Gopal Das M 54 1998 12-09-2001 6,32,000
Not
F45062 Siya Paul Siya Paul F 51 Available 19-06-2003 5,90,000
Not
M45026 Hari Krishna Hari Krishna M 38 2003 25-04-2003 Available
O45029 Priya Dixit Priya Dixit F 27 2005 12-07-2006 3,45,000
A45037 Anu Devara Anu Devara F 58 1985 12-09-2008 6,95,000
25. Create Email Addresses using lower case and underscore in between the names and end with
“@gmail.com”. (For example [email protected])

Procedure:

1. Lower(First Name)
2. Lower(Last Name
3. Use the function =CONCATENATE(First Name,"_",Last Name,"@gmail.com")

Output:

Employee Employee First Last First Last


ID Name Name Name Name Name Email ID
D45078 Somya Rao Somya Rao somya rao [email protected]
S45039 Raju Budda Raju Budda raju budda [email protected]
M45020 Jai Raj Jai Raj jai raj [email protected]
M45038 Kalyani Kumari Kalyani Kumari kalyani kumari [email protected]
M45037 Sam Joes Sam Joes sam joes [email protected]
S45059 Poter Michel Poter Michel poter michel [email protected]
Siddu
F45012 kommnani Siddu kommnani siddu kommnani [email protected]
Geeta
F45023 Chowdari Geeta Chowdari geeta chowdari [email protected]
Lavanya
D45078 Koppula Lavanya Koppula lavanya koppula [email protected]
Not
Available Hema Sarvani Hema Sarvani hema sarvani [email protected]
S45060 Gopal Das Gopal Das gopal das [email protected]
F45062 Siya Paul Siya Paul siya paul [email protected]
M45026 Hari Krishna Hari Krishna hari krishna [email protected]
O45029 Priya Dixit Priya Dixit priya dixit [email protected]
A45037 Anu Devara Anu Devara anu devara [email protected]
V. Table for 26 to 30 Questions:

Customer Company Phone Address, City, Amount Shipment


Name name Number State, ZIP Code $ Date Order Date
Stokes, 939 clear edge,
Jim van der Rutherford mesita, wv,
Mheen and Bauch 7282727491 14424 1,00,003 25-05-2016 19-04-2016
873 iron third
harbor, whelen
Shenita springs, nm,
Daven port Waelchi Inc 2676259210 37783 1,83,593 02-08-2016 03-07-2016
856 forge
Braun, overpass,
Jimmie Mc Crooks and annandale, nm,
Clure Ortiz 8373183928 08463 1,59,194 30-10-2016 21-10-2016
515 silver
Schamberger, highlands,
Mary Belle Yost and natalbany, wy,
Serrano Dach 8853887212 00462 1,80,394 20-04-2016 01-04-2016
221 jagged
harbor, franklin
Vito van Mann, Sauer borough, ny,
Helpen and Sauer 3507306802 80069 1,25,979 10-08-2016 18-07-2016
Salvatore p.o. box 51573,
Van Schmidt- berthold, sd,
Egmond Marks 5308189072 16229 1,11,804 30-08-2016 29-07-2016
p.o. box 42524,
Huels, matteson
Hay Wood Schuster and village, mn,
Meza Daugherty 8102106924 55503 1,08,063 25-02-2016 15-01-2016
249 old passage,
Margrett Armstrong james village, id,
Cowan Group 8661697766 64602 1,74,882 05-08-2017 15-07-2017
843 old camp,
new holland
Jerold MC Muller, Lakin village, wy,
Hooper and Bogan 9291511240 32125 1,30,140 05-04-2017 26-03-2017
956 lazy grove,
Leandro van Mueller and ouray, mi,
der Woerd Sons 67145298l3 38713 2,12,181 18-03-2017 18-01-2017
Braun,
Haywood Crooks and p.o. box 30184,
Huber Ortiz 7702510897 wolfe, ok, 08774 1,52,568 20-06-2017 31-05-2017
897 amber bluff,
Particia Schmidt- huntley, in,
Veen Hof Marks 8041074292 29911 1,52,088 08-08-2017 02-08-2017
937 indian
kennedy lawn,
Yvone Weber, south
Esparza Kuhlman and milwaukee, me,
Brook Hirthe 2099450674 85635 1,85,383 13-12-2017 05-12-2017
Weber, 670 lazy cider,
Yvone Kuhlman and glen raven, nc,
Esparza Hirthe 61616985o2 19967 1,39,493 30-05-2017 30-04-2017
370 eighth
Graham, mews, villano
Jame Towne and beach, nv,
Oosthuijzen Monahan 4729853826 52255 1,83,377 20-09-2017 07-09-2017
325 iron bluff
heights,
Filiberto Schmidt- walford, vt,
Kues Marks 8756599072 11877 1,98,796 20-05-2017 16-05-2017

26. From the above table, remove the invalid phone number which are not in the proper format of
having 10 digits, no characters and the phone numbers which are starting with 9/8/7/6

Company name Phone Number


Waelchi Inc 2676259210
Schamberger, Yost and Dach 8853887212
Mann, Sauer and Sauer 3507306802
Schmidt-Marks 5308189072
Weber, Kuhlman and Hirthe 2099450674
Graham, Towne and Monahan 4729853826

27. From the above table, put the phone numbers in US format.

Company name Phone Number


Waelchi Inc 267-625-9210
Schamberger, Yost and Dach 885-388-7212
Mann, Sauer and Sauer 350-730-6802
Schmidt-Marks 530-818-9072
Weber, Kuhlman and Hirthe 209-945-0674
Graham, Towne and Monahan 472-985-3826

28. From the above table, split the Address column into Address, City, State and ZIP code.

ZIP
Address City State Code
939 clear edge mesita wv 14424
873 iron third harbor whelen springs nm 37783
856 forge overpass annandale nm 8463
515 silver highlands natalbany wy 462

221 jagged harbor franklin borough ny 80069


p.o. box 51573 berthold sd 16229

p.o. box 42524 matteson village mn 55503


249 old passage james village id 64602
new holland
843 old camp village wy 32125
956 lazy grove ouray mi 38713
p.o. box 30184 wolfe ok 8774
897 amber bluff huntley in 29911
937 indian kennedy
lawn south milwaukee me 85635
670 lazy cider glen raven nc 19967
370 eighth mews villano beach nv 52255
325 iron bluff heights walford vt 11877

29. From the above table, select only the middle name from customer name.

Customer Name Middle Name


Jim van der Mheen van
Shenita Daven port Daven
Jimmie Mc Clure Mc
Mary Belle Serrano Belle
Vito van Helpen van
Salvatore Van
Egmond Van
Hay Wood Meza Wood
Margrett Cowan Cowan
Jerold MC Hooper MC
Leandro van der
Woerd van
Haywood Huber Huber
Particia Veen Hof Veen
Yvone Esparza
Brook Esparza
Yvone Esparza Esparza
Jame Oosthuijzen Oosthuijzen
Filiberto Kues Kues

30. From the above table, calculate the number of days required for shipment.

Use the function =Datedif(Order Date,Shipment Date, “D”)

Output:

No of Days
Shipment required
Customer Name Company name Order Date
Date for
shipment
Jim van der Mheen Stokes, Rutherford and Bauch 25-05-2016 19-04-2016 36
Shenita Daven port Waelchi Inc 02-08-2016 03-07-2016 30
Jimmie Mc Clure Braun, Crooks and Ortiz 30-10-2016 21-10-2016 9
Mary Belle Serrano Schamberger, Yost and Dach 20-04-2016 01-04-2016 19
Vito van Helpen Mann, Sauer and Sauer 10-08-2016 18-07-2016 23
Salvatore Van
Schmidt-Marks 30-08-2016 29-07-2016 32
Egmond
Huels, Schuster and
Hay Wood Meza 25-02-2016 15-01-2016 41
Daugherty
Margrett Cowan Armstrong Group 05-08-2017 15-07-2017 21
Jerold MC Hooper Muller, Lakin and Bogan 05-04-2017 26-03-2017 10
Leandro van der
Mueller and Sons 18-03-2017 18-01-2017 59
Woerd
Haywood Huber Braun, Crooks and Ortiz 20-06-2017 31-05-2017 20
Particia Veen Hof Schmidt-Marks 08-08-2017 02-08-2017 6
Yvone Esparza Brook Weber, Kuhlman and Hirthe 13-12-2017 05-12-2017 8
Yvone Esparza Weber, Kuhlman and Hirthe 30-05-2017 30-04-2017 30
Jame Oosthuijzen Graham, Towne and Monahan 20-09-2017 07-09-2017 13
Filiberto Kues Schmidt-Marks 20-05-2017 16-05-2017 4
Power Pivot and Power Query Questions:

VI. Power Query link(Order data set 1) Power Query link ( Order data set 2)

Use Power Query Editor to answer the following questions:

The columns in the above data set are:

Order Customer Cookies Order Ship Order


Revenue Cost
ID ID Shipped Date Date Status

31. Remove the rows which has improper data.

Procedure:

1. Open the file in Power Query Editor


2. Select Remove Rows→ Remove Duplicates
3. Select Remove Rows→ Remove Blanks

32. Split the column Customer ID into Customer ID and Customer Name.

Procedure:

1. Go to Split Column -> Select By Delimiter


2. Use the delimiter “-“

33. Remove the currency Symbol and the decimals (Give reasons for removing them) from the
column Cookies shipped.

1. Open the file in excel

2. Click on Format Cell value and change to Number.

3. Click on decrease decimal to remove the decimals

Reason : Cookies shipped is a whole number and not currency.

34. Calculate the profits for each of the customer.

1. Open the file in Power Query Editor


2. Go to Add Column
3. Click on Custom Column
4. Change the Column Name to Profits
5. Add the formula [Revenue]-[Cost] to Custom column formula

35. How many days does it take for the delivery of orders.

1. Open the file in Power Query Editor


2. Go to Add Column
3. Click on Custom Column
4. Change the Column Name to ‘No of Days’
5. Add the formula [Ship Date]-[Order Date]to Custom column formula
36. Load the second data set to the existing data set1.

1. Load both the files 2017 Order Data and 2018 Order Data in to Power Query Editor

2. Select Append as New Query and select both files

37. Create Pivot table for the cookies shipped year wise and quarter wise.

Number of Cookies
Row Labels Shipped
2017
Qtr1 78103
Qtr2 103576
Qtr3 110744
Qtr4 108776
2018
Qtr1 103672
Qtr2 108924
Qtr3 120991
Qtr4 115250
2019
Qtr1 4672
Grand Total 854708

38. Create pivot table and graph for the cookies shipped customer wise.

Pivot Table:

Cookies
Customer Name Shipped
Acme Grocery Stores 60568
Cascade Grovers 252330
Park & Eat LLC 149617
Quick Bite Convenience Stores 207278
YT Restaurants 184200
Grand Total 853993
Pivot Chart:

Customer wise Cookies Shipped


300000
250000
200000
150000
100000
50000
0 Total

39. Create pivot table to know the top 5 customers.

Sum of
Row Labels Profits
Acme Grocery Stores 151420
Cascade Grovers 630825
Park & Eat LLC 374042.5
Quick Bite Convenience Stores 518195
YT Restaurants 460500
Grand Total 2134982.5

40. Crate pivot table to know the relationship between the sales and the delivery of the orders.

Sum of Revenue Column Labels


Grand
Number of Days Taken to Deliver 2017 2018 2019 Total
2 657795 686100 3550 1347445
3 214360 278810 4340 497510
4 448925 535305 10520 994750
5 659730 721150 2620 1383500
6 25185 22820 2330 50335
Grand Total 2005995 2244185 23360 4273540
VI. Power Query and Power Pivot Link (Sales_2018)

Power Query and Power Pivot Link (Sales_ 2019)

41. In Power Query Editor concatenate the first two rows.

1. Under Transform>Transpose to transpose the table.

2. Select the first two columns, under Transform>Text column, select Merge Columns, in the
prompt, select Space as separator.

3. Under Transform>Transpose, transpose the table back.

42. In Power Query Editor Split the column ship mode and container.

Under Transform>Split Column→ By Delimeter –

43. What is percentage of total shipping amount for each order priority.

Ship Mode Container.1 Count of Order Priority Shipping Amount Percentage

Regular Air 1471 10949.04 43.88734034

Express Air 274 2025.46 8.118707427

Delivery Truck 259 11973.56 47.99395224

44. Find the bottom 3 Shipment Mode and Container by total Unit Sell Price.

Ship Mode Container Total Unit Price

Express Air - Wrap Bag 353.36

Regular Air - Jumbo Box 11.24

Regular Air - Jumbo Drum 3.29

45. Sort Customer ID by Unit Sell Price in ascending order.

Customer ID Unit Price

C629 1.26

C220 1.68

C328 1.7

C277 1.74

C427 1.76
Customer ID Unit Price

C683 1.76

C444 1.88

C727 1.88

C212 2.08

C516 2.1

46. Calculate the number days for shipment and establish a relationship between the number days
for shipment and shipment amount.

Number of Days for Shipment Count Shipping Amount

1 624 7590.85

2 813 10267.26

7 61 740.03

3 82 947.47

0 225 2553.48

4 92 1399.06

5 83 1195.48

9 22 235.58

6 2 18.85

47. Find the total selling price customer wise?

Customer ID Total Selling Price

C001 2.88

C002 554.88

C003 5.98

C004 138.67

C005 435.36

C006 11.3

C007 6804.75

C009 45.99
Customer ID Total Selling Price

C010 93.93

C011 32.43

48. Has Order priority has any influence on the shipping amount.

Yes Order Priority Influences the shipping Amount

49. Which shipment mode has more customers?

Regular Air has more customers - 1471

50. Is order Id determined by discount percent?

No.

You might also like