chapter.07
DESCRIPTION
TRANSCRIPT
![Page 1: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/1.jpg)
XP
Organizing Data for Effective Analysis
Chapter 7
“There is no such thing as too much planning and tracking.”- Indra Nooyi
![Page 2: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/2.jpg)
XP
Chapter Introduction
• Ways to manage and analyze large amounts of nonnumeric data using lists, a PivotTable report, and XML
• Functions covered in this chapter: CONCATENATE, FIND, LEFT, RIGHT, SEARCH, TODAY, TRIM, YEARFRAC
![Page 3: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/3.jpg)
XP
Functions Covered in this Chapter
• CONCATENATE• FIND• LEFT• RIGHT• SEARCH• TODAY• TRIM• YEARFRAC
![Page 4: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/4.jpg)
XPLevel 1 Objectives:Importing and Structuring Text
Data in Excel Worksheets
• Import text data into a worksheet• Concatenate values and extract characters from a
text string• Parse text using the Convert Text to Columns Wizard• Analyze data by creating subtotals• Create, sort, and filter an Excel list
![Page 5: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/5.jpg)
XPWorking with Text Data:Comma-Delimited Files
• Separate values in each record with commas• Also called comma-separated values (CSV)• Once imported into a worksheet, each value in a
record appears in a separate cell• Paragraph mark identifies the end of each record
![Page 6: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/6.jpg)
XP
Working with Text Data: Goals
• Determine the format you need, so you can find the best way to change unstructured data into structured data
• Change format of unstructured data
![Page 7: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/7.jpg)
XPExample of Unstructured Data Pasted into Excel
![Page 8: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/8.jpg)
XPCombining Text Using the CONCATENATE Function
• Combines values in a range of cells into one text item in a new cell
• =CONCATENATE(text1,text2,…)
![Page 9: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/9.jpg)
XPCombining Text Using the CONCATENATE Function
![Page 10: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/10.jpg)
XPExtracting Characters from a Text String
• May be used to remove incorrect entries• RIGHT function
Returns last character(s) in a text string, based on number of characters specified
=RIGHT(text,num_chars)
• LEFT function Extracts characters from the beginning or “left side” of
a text string =LEFT(text,num_chars)
![Page 11: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/11.jpg)
XPExtracting Charactersfrom a Text String
![Page 12: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/12.jpg)
XPRemoving Spacesfrom a Text String
• TRIM function Removes all spaces in a text string except for the
single spaces between words =TRIM(text)
![Page 13: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/13.jpg)
XPRemoving Spacesfrom a Text String
![Page 14: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/14.jpg)
XPDetermining the Position of a Character within a Text String
• FIND function Returns the starting position of one text value within
another text value Case sensitive =FIND(find_text,within_text,start_num)
• SEARCH function Does same thing as FIND function, but is not case
sensitive
![Page 15: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/15.jpg)
XPDetermining the Position of a Character within a Text String
![Page 16: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/16.jpg)
XP
Sorting and Removing Invalid Data
• Copy contents of worksheet into a new worksheet to preserve original data and eliminate potential problem of automatically updating formulas as data is modified
• Sort the data in the new worksheet to separate valid rows from invalid rows Valid rows contain a “1” and appear first in the sort
• Delete invalid rows
![Page 17: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/17.jpg)
XP
Sorting and Removing Invalid Data
![Page 18: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/18.jpg)
XPCommon Functions that Manipulate Data
![Page 19: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/19.jpg)
XPCommon Functions that Manipulate Data (continued)
![Page 20: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/20.jpg)
XP
Working with Nonnumeric Data
• Convert Text to Columns Wizard Separates values in a text string into columns or fields
• Two ways to parse text into columns Identify the character that delimits the data Set field widths to identify the breaks between data that
appears in columns
![Page 21: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/21.jpg)
XPUsing Text to Columns Wizard to Parse Data
![Page 22: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/22.jpg)
XPUsing Text to Columns Wizard to Parse Data
![Page 23: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/23.jpg)
XP
Labeling and Sorting Data
![Page 24: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/24.jpg)
XPAnalyzing Data by Creating Subtotals
• Subtotal tool Creates summary reports that quickly organize data
into categories with subtotal calculations Can collapse and expand level of detail in the report
![Page 25: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/25.jpg)
XP
Using the Subtotal Tool
![Page 26: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/26.jpg)
XPCreating and Working with an Excel List
• A range of cells that are formalized as a single unit• Adds many features that aren’t available in an
unstructured list (validation, sorting, filtering)• Protects integrity of data
Data in the columns of each row automatically remains intact when data is filtered or sorted
• Limitations Limit of 65,536 rows and 256 columns Entire workbook must be loaded into memory
![Page 27: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/27.jpg)
XP
Results of Creating an Excel List
![Page 28: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/28.jpg)
XP
Working with an Excel List
• Sorting an Excel list Automatic, once you select one cell in the column
• Filtering an Excel list Lets you display data based on criteria you specify
• Adding data to an Excel list Type data into blank row at bottom of list Use a form
![Page 29: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/29.jpg)
XP
Filtering an Excel List
![Page 30: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/30.jpg)
XP
Filtering an Excel List
![Page 31: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/31.jpg)
XP
Level 1 Summary
• Importing data stored in a text file into Excel• Using Excel functions
CONCATENATE to combine multiple text strings into a single text string
TRIM to trim unnecessary spaces from a text string RIGHT to find and extract characters from a text string FIND to find specific characters in a text string
![Page 32: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/32.jpg)
XP
Level 1 Summary (continued)
• Transforming delimited data into rows and columns of data that can be sorted and filtered using Excel tools
• Creating subtotals to analyze data• Creating and working with data stored in an Excel list
![Page 33: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/33.jpg)
XPLevel 2 Objectives: Analyzing Data Imported from a Database & Organizing
Data with a PivotTable Report
• Import data stored in a database into Excel• Use dates and times in calculations• Analyze data using a PivotTable report• Create a PivotChart report• Import information from the Web into Excel using a
Web query
![Page 34: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/34.jpg)
XP
Database Terminology
Database Set of related data that is stored in tables
Table Collection of fields that describe a specific entity
Field A single characteristic of the entity
Record Set of fields that describes one product or person
Database management system
Software program that creates and accesses data in a database(e.g., Microsoft Access and Oracle)
![Page 35: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/35.jpg)
XPImporting Data from a Database into Excel
• Database provides the structure to ensure that the right data is available and protected
• Spreadsheet provides analytical power and flexibility• Reduce data redundancy by storing data in related
tables in a normalized database
![Page 36: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/36.jpg)
XPImporting an Access Table into Excel
![Page 37: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/37.jpg)
XPUsing the Query Wizard to Select Data from a Database
• Lets you choose the data source and select the database table and fields to import into the workbook
• Prompts you to define criteria for the data you want to import by selecting only rows that meet criteria you specify
![Page 38: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/38.jpg)
XPUsing the Query Wizard to Select Data from a Database
![Page 39: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/39.jpg)
XPMaking Calculations with Date and Time Data
• TODAY function Returns current date’s serial number (based on
computer’s internal clock) =TODAY()
• Requires no additional arguments
• YEARFRAC function Calculates the number of years between the two days =YEARFRAC(start_date,end_date,basis)
![Page 40: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/40.jpg)
XP
Using the TODAY Function
![Page 41: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/41.jpg)
XP
Using the YEARFRAC Function
![Page 42: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/42.jpg)
XP
![Page 43: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/43.jpg)
XPAnalyzing Data Usinga PivotTable Report
• Interactive report that lets you summarize and analyze a data set
• Dynamic organization; can be “pivoted” to examine data from various perspectives by rearranging its structure
• Best used to analyze data that can be summarized in multiple ways
![Page 44: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/44.jpg)
XP
Creating a PivotTable Report
![Page 45: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/45.jpg)
XP
PivotTable Added to a Worksheet
![Page 46: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/46.jpg)
XPAnalyzing Data Using the Row, Column, and Data Areas
• To add data to a PivotTable report, drag the field you want to summarize to a drop area on the report Row Area displays data from that field in rows Column Area displays data from that field in rows Data Area summarizes data from that field
![Page 47: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/47.jpg)
XP
Organizing Data by Row
![Page 48: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/48.jpg)
XP
Organizing Data by Column
![Page 49: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/49.jpg)
XP
Adding Fields to the Page Area
![Page 50: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/50.jpg)
XPEvaluating Data Using a PivotChart Report
• Represents source data (usually from PivotTable report) as a graphic
• Use Chart Wizard button on PivotTable toolbar• Can change layout, data displayed, and chart type
![Page 51: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/51.jpg)
XPImporting Information from the Web into Excel
• Web query Automated method for retrieving information from a
Web page without having to copy and past
![Page 52: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/52.jpg)
XP
Level 2 Summary
• Advantages of using a database to store data that can be exported to Excel for analysis
• Using the Query Wizard to select specific records in a database and import them into Excel
• How Excel stores and works with dates and times • Using dates in calculations to determine the number
of days and years between two dates• Creating and using a PivotTable report• Using a Web query to import information from the
Web into an Excel worksheet to use in calculations
![Page 53: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/53.jpg)
XPLevel 3 Objectives: Importing and Exporting XML
Data
• Understand markup languages and XML• Import XML data into Excel as an XML list• Add an XML map to a workbook• Export XML data from Excel into an XML document• Map elements in an XML document to a workbook
![Page 54: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/54.jpg)
XPUnderstanding Markup Languages and XML
• Markup language Link between content and instructions for formatting
that content Uses a set of tags to distinguish different elements in a
document
• Examples HTML (Hypertext Markup Language) SGML (Standardized General Markup Language) XML (Extensible Markup Language)
![Page 55: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/55.jpg)
XP
Markup Languages
HTML SGML XML
• Creates Web pages (HTML documents)
• Embed tags in document to describe how to format the content
• Most browsers read and interpret HTML tags in the same way
• Divides document into elements
• Document type definition (DTD) identifies elements in a document and their structural relationships
• Allows definition of other markup languages
• Combines markup power of SGML with ease of use of HTML
• Defines structure and rules for creating markup elements
• Stores information in a nonproprietary format
![Page 56: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/56.jpg)
XP
XML Documents
• User-defined documents in which the user develops a DTD that defines the elements contained in a document and descriptions of how those elements are related to each other
• Data can be combined with meta-data
<shoe><shoe_ID>SH-1987</shoe_ID><shoe_name>Running shoe</shoe_name><description>Men’s size 11, white</description></shoe>
![Page 57: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/57.jpg)
XP
Analyzing XML Data with Excel
• Import data into worksheet; method depends on the data Import entire XML document as a list (root element,
schema) Use XML Source task pane to map elements you need
to columns in a list Export XML data as a “well-formed” XML document
![Page 58: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/58.jpg)
XPImporting XML Data as an XML List
![Page 59: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/59.jpg)
XP
Importing XML data as an XML list
![Page 60: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/60.jpg)
XPAdding an XML Map to a Workbook
![Page 61: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/61.jpg)
XPAdding an XML Map to a Workbook
![Page 62: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/62.jpg)
XPAdding an XML Map to a Workbook
![Page 63: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/63.jpg)
XP
Exporting XML Data
![Page 64: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/64.jpg)
XP
Exporting XML Data
![Page 65: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/65.jpg)
XP
Level 3 Summary
• Different markup languages, including XML• Using an existing XML document to import and XML
map in a workbook• Mapping XML elements into a worksheet• Importing data into an XML list and exporting data to
an XML document
![Page 66: Chapter.07](https://reader038.vdocuments.net/reader038/viewer/2022110113/545263cfaf795985248b6762/html5/thumbnails/66.jpg)
XP
Chapter Summary
• Importing and structuring text data in Excel worksheets
• Analyzing data imported from a database and organizing data with a PivotTable report
• Importing and exporting XML data