# Promoting high quality, cost effective drug therapy throughout the Military Health System Pivot Tables 101 Analyzing prescription data with Microsoft Excel.

## Presentation on theme: "Promoting high quality, cost effective drug therapy throughout the Military Health System Pivot Tables 101 Analyzing prescription data with Microsoft Excel."— Presentation transcript:

Promoting high quality, cost effective drug therapy throughout the Military Health System Pivot Tables 101 Analyzing prescription data with Microsoft Excel without going crazy or staying up all night Prepared by the DoD Pharmacoeconomic Center

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 2 Objectives 1.Explain what a pivot table is and what its good for 2.Describe what data files should look like and explain how they are imported into Excel 3.Build pivot tables and analyze sample pharmacy data using pivot tables and pivot charts

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 3 If we have time… 4.Demonstrate quickly transferring pivot tables onto Powerpoint slides for presentation 5.Discuss what you can do if you have more data than the maximum row limit in Excel (65,536 rows) or the maximum number of unique items in a field (32,500)

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 4 Self-Assessment Questions 1.When would you change data types when importing data into Excel? 2.How do you select data to include in a pivot table? 3.If you want to look at a graph of medication use over time, what fields do you need and where do you put them on the pivot table page? 4.How do you limit a pivot table or chart to only those items you want to look at? 5.How do you change the aggregate measure (e.g., sum, count, max, min) of your data?

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 5 What are Pivot Tables? Expands spreadsheet functions of Excel so you can easily explore multiple views of data –Multiple filters & measures –Query large amounts of data –Drill-down to identify issues –Define your own formulas –Auto charting & graphing Microsoft Office 2003 –2007 goes even further

Data for Pivot Tables Import data as columns –Items read down, not across –Each column is a data field Generic name StrengthDosage form Month#RxsSite Furosemide40 mgtabletMar 06234A Furosemide40 mgtabletApr 06223A Furosemide40 mgtabletMay 06345A Furosemide40 mgtabletMar 0624B Generally need at least one summing measure –Number of Rxs, tablets, users, costs Include multiple parameters for filtering

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 7 But what if you want to look at data at the individual prescription level? Rx #Patient IDAgeSex Generic nameStrength Date dispensed Qty dispensed 1234567100099999129Momeprazole20 mg9/1/200690 1256789100099999243Frabeprazole20 mg9/15/2006180 1334567100099999243Fomeprazole40 mg11/23/0630 Each row = 1 Rx, so we will have the program count the rows to get total numbers of Rxs Sure, theres always an exception

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 8 Lets Get Started

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 9 Interactive session

DoD Pharmacoeconomic Center www.pec.ha.osd.mil 10 Self-Assessment Questions 1.When would you change data types when importing data into Excel? 2.How do you select data to include in a pivot table? 3.If you want to look at a graph of medication use over time, what fields do you need and where do you put them on the pivot table page? 4.How do you limit a pivot table or chart to only those items you want to look at? 5.How do you change the aggregate measure (e.g., sum, count, max, min) of your data?

Similar presentations