Create a report in excel from data

Содержание

  1. How to Create a Report in Excel
  2. In This Article
  3. What to Know
  4. Creating Basic Charts and Tables for an Excel Report
  5. Using PivotTables to Generate a Report From an Excel Spreadsheet
  6. How to Print Your Excel Report
  7. How to Create a Report in Excel: The PivotTable
  8. PRYOR+ 7-DAYS OF FREE TRAINING
  9. Create status and trend reports from a work item query
  10. Prerequisites
  11. Create an Excel report from a flat-list query
  12. Create a query-based report by using Excel
  13. Q: Can I export a query to Excel?
  14. Q: Which fields can’t I use to generate a report?
  15. Q: Can I create reports if I’m working in Azure DevOps?
  16. Q: How do I refresh the report to show the most recent data?

How to Create a Report in Excel

Using charts, graphs, and pivot tables makes it easy

In This Article

Jump to a Section

What to Know

  • Create a report using charts: Select Insert >Recommended Charts, then choose the one you want to add to the report sheet.
  • Create a report with pivot tables: Select Insert >PivotTable. Select the data range you want to analyze in the Table/Range field.
  • Print: Go to File >Print, change the orientation to Landscape, scaling to Fit All Columns on One Page, and select Print Entire Workbook.

This article explains how to create a report in Microsoft Excel using key skills like creating basic charts and tables, creating pivot tables, and printing the report. The information in this article applies to Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel for Mac.

Creating Basic Charts and Tables for an Excel Report

Creating reports usually means collecting information and presenting it all in a single sheet that serves as the report sheet for all of the information. These report sheets should be formatted in a way that’s easy to print as well.

One of the most common tools people use in Excel to create reports is the chart and table tools. To create a chart in an Excel report sheet:

Select Insert from the menu, and in the charts group, select the type of chart you want to add to the report sheet.

In the Chart Design menu, in the Data group, select Select Data.

Select the sheet with the data and select all cells containing the data you want to chart (include headers).

The chart will update in your report sheet with the data. The headers will be used to populate the labels in the two axis.

Repeat the above steps to create new charts and graphs that appropriately represent the data you want to show in your report. When you need to create a new report, you can just paste the new data into the data sheets, and the charts and graphs update automatically.

There are different ways to lay out a report using Excel. You can include graphs and charts on the same page as tabular (numeric) data, or you can create multiple sheets so visual reporting is on one sheet, tabular data is on another sheet, and so on.

Using PivotTables to Generate a Report From an Excel Spreadsheet

Pivot tables are another powerful tool for creating reports in Excel. Pivot tables help with digging more deeply into data.

Select the sheet with the data you want to analyze. Select Insert > PivotTable.

In the Create PivotTable dialogue, in the Table/Range field, select the range of data you want to analyze. In the Location field, select the first cell of the worksheet where you want the analysis to go. Select OK to finish.

This will launch the pivot table creation process in the new sheet. In the PivotTable Fields area, the first field you select will be the reference field.

In this example, this pivot table will show website traffic information by month. So, first, you’d select Month.

Next, drag the data fields you want to show data for into the values area of the PivotTable fields pane. You’ll see the data imported from the source sheet into your pivot table.

The pivot table collates all of the data for multiple items by adding them (by default). In this example, you can see which months had the most page views. If you want a different analysis, just select the drop-down arrow next to the item in the Values pane, then select Value Field Settings.

In the Value Field Settings dialog box, change the calculation type to whichever you prefer.

This will update the data in the pivot table accordingly. Using this approach, you can perform any analysis you like on source data, and create pivot charts that display the information in your report in the way you need.

How to Print Your Excel Report

You can generate a printed report from all the sheets you created, but first you need to add page headers.

Select Insert > Text > Header & Footer.

Type the title for the report page, then format it to use larger than normal text. Repeat this process for each report sheet you plan to print.

Next, hide the sheets you don’t want included in the report. To do this, right-click the sheet tab and select Hide.

To print your report, select File > Print. Change orientation to Landscape, and scaling to Fit All Columns on One Page.

Select Print Entire Workbook. Now when you print your report, only the report sheets you created will print as individual pages.

You can either print your report out on paper, or print it as a PDF and send it out as an email attachment.

Open an Excel spreadsheet, turn off gridlines, and enter your basic expense report information, such as a title, time period, and employee name. Add data columns for Date and Description, and then add columns for expense specifics, such as Hotel, Meals, and Phone. Enter your information and create an Excel table.

To use Excel’s scenario manager function, select the cells with the information you’re exploring, and then go to the ribbon and select Data. Select What-If Analysis > Scenario Manager. In the Scenario Manager dialog box, select Add. Name the scenario and change your data to see various outcomes.

In Salesforce, go to Reports and find the report you want to export. Select Export and choose an export view (Formatted Report or Details Only). Formatted Report will export in .xlsx format, while Details Only gives you other choices. Select Export when ready.

Источник

How to Create a Report in Excel: The PivotTable

Excel is a powerful reporting tool, providing options for both basic and advanced users. One of the easiest ways to create a report in Excel is by using the PivotTable feature, which allows you to sort, group, and summarize your data simply by dragging and dropping fields.

First, Organize Your Data

Record your data in rows and columns. For example, data for a report on sales by territory and product might look like this:

A PivotTable report works best when the source data have:
1. One record in each row;

2. One column for each category for sorting and grouping (such as “Territory” and “Product” in the example above; and

3. One column for each metric (such as “Units Sold” and “Sales Revenue” above). Recording some sales revenue in a different column complicates the task of adding up all of the sales revenue.

Create the PivotTable

Next, create the PivotTable report:
1. Highlight your data table.

2. From the Insert ribbon, click the PivotTable button.

3. On the far right, select fields that you would like on the left-hand side of the report and drag them to the Rows box.

4. Also on the far right, select fields that you would like to appear across the top of the report and drag them to the Columns box.

5. Select the data that you would like to summarize and drag it to the Values box.

6. For each item under Values, specify how to aggregate the data—with a sum, average, or some other function. This is a great time-saving step!

With each change, you’ll see your PivotTable report take shape. If you decide you don’t like the layout, just drag the fields to other positions.

Formatting Your PivotTable Report

From the PivotTable Design ribbon, choose a style for your report based on your theme’s color schemes with options for header rows, header columns, totals, and subtotals. From the Home ribbon, set the number format for your data, or right-click your data, choose Value Field Settings, and click Number Format.

Other Report Options

Do you want even more flexibility in your reports? Do you ever need to, say, connect to data in an external database or create charts based on your reports? All of these options are available with PivotTables!

Or, if you need more flexibility than PivotTables provide, you can:
1. Create a freeform report by adding totals and subtotals directly to your source data,

2. Use the Group and Subtotal options on the new Outline section of the Data ribbon, or

3. If you’re using Excel 2013, use the new Quick Analysis button.

No matter which option you choose, Excel is one of the most flexible reporting tools available today!

PRYOR+ 7-DAYS OF FREE TRAINING

Courses in Customer Service, Excel, HR, Leadership, OSHA and more. No credit card. No commitment. Individuals and teams.

Источник

Create status and trend reports from a work item query

TFS 2017 | TFS 2015 | TFS 2013

One of the quickest ways to generate a custom work tracking report is to use Excel and start with a flat list query. You can generate both status and trend charts. Also, once you’ve built a report, you can manipulate the data further by adding or filtering fields using the PivotTable.

This feature is supported for the following versions and configurations:

  • Azure DevOps Server 2020 and earlier versions configured with SQL Server Analysis Services.
  • For Azure DevOps Server 2019 and Azure DevOps Server 2020, supports projects that are defined on project collections configured with the On-premises XML process model. If your collection is configured to support the Inheritance process model, you can use Analytics views to filter work items and generate Power BI reports. To learn more, see What are Analytics views? To learn more about process models, see Customize your work tracking experience.

If you want to export work items to Excel, see Bulk add or modify work items with Excel. To get the latest version of the Azure DevOps add-in for Office, install Azure DevOps Office® Integration 2019.

Here’s an example of a status report generated from a flat-list query.

Prerequisites

You can generate these reports only when you work with an on-premises Azure DevOps Server that has been configured with reporting services.

Your deployment needs to be integrated with reporting services. If your on-premises application-tier server hasn’t been configured to support reporting services, you can add that functionality by following the steps provided here: Add reports to a team project.

You must be a member of the TfsWarehouseDataReader security roles. To get added, see Grant permissions to view or create reports in Azure DevOps Server.

A version of Excel that is compatible with your version of Azure DevOps, such as Office 2010 or later version. For a complete list of supported versions, see Azure DevOps client compatibility, Microsoft Office integration. If you don’t have Excel, install it now.

A version of Visual Studio that supports the Team Explorer plugin, such as Visual Studio or Visual Studio Community. You can install Visual Studio from this download site. Team Explorer is free and requires a Windows OS.

To work from Microsoft Excel and use the Team menu, you’ll need to install Azure DevOps Office® Integration 2019.

Create an Excel report from a flat-list query

Use this procedure when you work from the Team Explorer plug-in for Visual Studio.

Create or open a flat-list query that contains the work items that you want to include in the report.

To view queries in Visual Studio 2019 and later versions, you must choose the Tools option Legacy experience (compatibility mode) as described in Set the Work Items experience in Visual Studio 2019.

Choose the fields you want to base reports on and include them in the filter criteria or as a column option. For non-reportable fields, see Q: Which fields are non-reportable?

Create a report in Excel From the query results view. The option to Create Report in Microsoft Excel only appears if all prerequisites are met.

Select the check boxes of the reports that you want to generate.

Wait until Excel finishes generating the reports. This step might take several minutes, depending on the number of reports and quantity of data.

Each worksheet displays a report. The first worksheet provides hyperlinks to each report. Pie charts display status reports and area graphs display trend charts.

To view a report, choose a tab, for example, choose the State tab to view the distribution of work items by State.

You can change the chart type and filters. For more information, see Use PivotTables and other business intelligence tools to analyze your data.

Create a query-based report by using Excel

Use this procedure when you work from the web portal or the Team Explorer plug-in for Visual Studio.

Open an Office Excel workbook and choose New Report.

The option New Report appears even if all prerequisites aren’t met. Choosing it may cause Excel to stop responding or display the following error message:

If you don’t see the Team menu, you’ll need to install you’ll need to install the Azure DevOps Office® Integration 2019. See Requirements listed earlier in this article.

Connect to the project and choose the query.

If the server you need isn’t listed, add it now.

Choose the reports to generate (steps 3 and 4 from the previous procedure).

Q: Can I export a query to Excel?

A: If you want to export a query to Excel, you can do that from Excel or Visual Studio/Team Explorer. Or, to export a query directly from the web portal Queries page, install the Azure DevOps Open in Excel Marketplace extension. This extension adds an Open in Excel link to the toolbar of the query results page.

Q: Which fields can’t I use to generate a report?

A: Even though you can include non-reportable fields in your query field criteria or as a column option, they won’t be used to generate a report.

Description, History, and other HTML data-type fields. These fields won’t be added to the PivotTable or used to generate a report. Excel does not support generating reports on these fields.

Fields with filter criteria that specify the Contains, Contains Words, Does Not Contain, or Does Not Contain Words operators will not be added to the PivotTable. Excel does not support these operators. To learn more about these operators, see Query fields, operators, and macros.

Q: Can I create reports if I’m working in Azure DevOps?

A: You can’t create Excel reports; however, you can create query-based charts, generate Power BI reports using an Analytics views, or use the Analytics Service.

Q: How do I refresh the report to show the most recent data?

A: At any time, you can choose Refresh on the Data tab within Excel to update the data for the PivotTables in your workbook. To learn more, see Refresh PivotTable data.

Источник

37

37 people found this article helpful

How to Create a Report in Excel

Using charts, graphs, and pivot tables makes it easy

Updated on September 25, 2022

What to Know

  • Create a report using charts: Select Insert > Recommended Charts, then choose the one you want to add to the report sheet.
  • Create a report with pivot tables: Select Insert > PivotTable. Select the data range you want to analyze in the Table/Range field.
  • Print: Go to File > Print, change the orientation to Landscape, scaling to Fit All Columns on One Page, and select Print Entire Workbook.

This article explains how to create a report in Microsoft Excel using key skills like creating basic charts and tables, creating pivot tables, and printing the report. The information in this article applies to Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel for Mac.

Creating Basic Charts and Tables for an Excel Report

Creating reports usually means collecting information and presenting it all in a single sheet that serves as the report sheet for all of the information. These report sheets should be formatted in a way that’s easy to print as well.

One of the most common tools people use in Excel to create reports is the chart and table tools. To create a chart in an Excel report sheet:

  1. Select Insert from the menu, and in the charts group, select the type of chart you want to add to the report sheet.

  2. In the Chart Design menu, in the Data group, select Select Data.

  3. Select the sheet with the data and select all cells containing the data you want to chart (include headers).

  4. The chart will update in your report sheet with the data. The headers will be used to populate the labels in the two axis.

  5. Repeat the above steps to create new charts and graphs that appropriately represent the data you want to show in your report. When you need to create a new report, you can just paste the new data into the data sheets, and the charts and graphs update automatically.

    There are different ways to lay out a report using Excel. You can include graphs and charts on the same page as tabular (numeric) data, or you can create multiple sheets so visual reporting is on one sheet, tabular data is on another sheet, and so on.

Using PivotTables to Generate a Report From an Excel Spreadsheet

Pivot tables are another powerful tool for creating reports in Excel. Pivot tables help with digging more deeply into data.

  1. Select the sheet with the data you want to analyze. Select Insert > PivotTable.

  2. In the Create PivotTable dialogue, in the Table/Range field, select the range of data you want to analyze. In the Location field, select the first cell of the worksheet where you want the analysis to go. Select OK to finish.

  3. This will launch the pivot table creation process in the new sheet. In the PivotTable Fields area, the first field you select will be the reference field.

    In this example, this pivot table will show website traffic information by month. So, first, you’d select Month.

  4. Next, drag the data fields you want to show data for into the values area of the PivotTable fields pane. You’ll see the data imported from the source sheet into your pivot table.

  5. The pivot table collates all of the data for multiple items by adding them (by default). In this example, you can see which months had the most page views. If you want a different analysis, just select the drop-down arrow next to the item in the Values pane, then select Value Field Settings.

  6. In the Value Field Settings dialog box, change the calculation type to whichever you prefer.

  7. This will update the data in the pivot table accordingly. Using this approach, you can perform any analysis you like on source data, and create pivot charts that display the information in your report in the way you need.

How to Print Your Excel Report

You can generate a printed report from all the sheets you created, but first you need to add page headers.

  1. Select Insert > Text > Header & Footer.

  2. Type the title for the report page, then format it to use larger than normal text. Repeat this process for each report sheet you plan to print.

  3. Next, hide the sheets you don’t want included in the report. To do this, right-click the sheet tab and select Hide.

  4. To print your report, select File > Print. Change orientation to Landscape, and scaling to Fit All Columns on One Page.

  5. Select Print Entire Workbook. Now when you print your report, only the report sheets you created will print as individual pages.

    You can either print your report out on paper, or print it as a PDF and send it out as an email attachment.

FAQ

  • How do I create an expense report in Excel?

    Open an Excel spreadsheet, turn off gridlines, and enter your basic expense report information, such as a title, time period, and employee name. Add data columns for Date and Description, and then add columns for expense specifics, such as Hotel, Meals, and Phone. Enter your information and create an Excel table.

  • How do I create a scenario summary report in Excel?

    To use Excel’s scenario manager function, select the cells with the information you’re exploring, and then go to the ribbon and select Data. Select What-If Analysis > Scenario Manager. In the Scenario Manager dialog box, select Add. Name the scenario and change your data to see various outcomes.

  • How do I export a Salesforce report to Excel?

    In Salesforce, go to Reports and find the report you want to export. Select Export and choose an export view (Formatted Report or Details Only). Formatted Report will export in .xlsx format, while Details Only gives you other choices. Select Export when ready.

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Maintenance Alert: Saturday, April 15th, 7:00pm-9:00pm CT. During this time, the shopping cart and information requests will be unavailable.

Categories: Basic Excel

Excel is a powerful reporting tool, providing options for both basic and advanced users. One of the easiest ways to create a report in Excel is by using the PivotTable feature, which allows you to sort, group, and summarize your data simply by dragging and dropping fields.

First, Organize Your Data

Record your data in rows and columns. For example, data for a report on sales by territory and product might look like this:

Reports 1

A PivotTable report works best when the source data have:
1. One record in each row;

2. One column for each category for sorting and grouping (such as “Territory” and “Product” in the example above; and

3. One column for each metric (such as “Units Sold” and “Sales Revenue” above). Recording some sales revenue in a different column complicates the task of adding up all of the sales revenue.

Create the PivotTable

Next, create the PivotTable report:
1. Highlight your data table.

2. From the Insert ribbon, click the PivotTable button.

3. On the far right, select fields that you would like on the left-hand side of the report and drag them to the Rows box.

4. Also on the far right, select fields that you would like to appear across the top of the report and drag them to the Columns box.

5. Select the data that you would like to summarize and drag it to the Values box.

6. For each item under Values, specify how to aggregate the data—with a sum, average, or some other function. This is a great time-saving step!

Reports 2

With each change, you’ll see your PivotTable report take shape. If you decide you don’t like the layout, just drag the fields to other positions.

Formatting Your PivotTable Report

From the PivotTable Design ribbon, choose a style for your report based on your theme’s color schemes with options for header rows, header columns, totals, and subtotals. From the Home ribbon, set the number format for your data, or right-click your data, choose Value Field Settings, and click Number Format.

Other Report Options

Do you want even more flexibility in your reports? Do you ever need to, say, connect to data in an external database or create charts based on your reports? All of these options are available with PivotTables!

Or, if you need more flexibility than PivotTables provide, you can:
1. Create a freeform report by adding totals and subtotals directly to your source data,

2. Use the Group and Subtotal options on the new Outline section of the Data ribbon, or

3. If you’re using Excel 2013, use the new Quick Analysis button.

No matter which option you choose, Excel is one of the most flexible reporting tools available today!

PRYOR+ 7-DAYS OF FREE TRAINING


Courses in Customer Service, Excel, HR, Leadership,
OSHA and more. No credit card. No commitment. Individuals and teams.


Download Article


Download Article

This wikiHow teaches you how to automate the reporting of data in Microsoft Excel. For external data, this wikiHow will teach you how to query and create reports from any external data source (MySQL, Postgres, Oracle, etc) from within your worksheet using Excel plugins that link your worksheet to external data sources.

For data already stored in an Excel worksheet, we will use macros to build reports and export them in a variety of file types with the press of one key. Luckily, Excel comes with a built-in step recorder which means you will not have to code the macros yourself.

  1. Image titled Automate Reports in Excel Step 1

    1

    If the data you need to report on is already stored, updated, and maintained in Excel, you can automate reporting workflows using Macros. Macros are a built in function that allow you to automate complex and repetitive tasks.

  2. Image titled Automate Reports in Excel Step 2

    2

    Open Excel. Double-click (or click if you’re on a Mac) the Excel app icon, which resembles a white «X» on a green background, then click Blank Workbook on the templates page.

    • On a Mac, you may have to click File and then click New Blank Workbook in the resulting drop-down menu.
    • If you already have an Excel report that you want to automate, you’ll instead double-click the report’s file to open it in Excel.

    Advertisement

  3. Image titled Automate Reports in Excel Step 3

    3

    Enter your spreadsheet’s data if necessary. If you haven’t added the column labels and numbers for which you want to automate results, do so before proceeding.

  4. Image titled Automate Reports in Excel Step 4

    4

    Enable the Developer tab. By default, the Developer tab doesn’t show up at the top of the Excel window. You can enable it by doing the following depending on your operating system:

    • Windows — Click File, click Options, click Customize Ribbon on the left side of the window, check the «Developer» box in the lower-right side of the window (you may first have to scroll down), and click OK.[1]
    • Mac — Click Excel, click Preferences…, click Ribbon & Toolbar, check the «Developer» box in the «Main Tabs» list, and click Save.[2]
  5. Image titled Automate Reports in Excel Step 5

    5

    Click Developer. This tab should now be at the top of the Excel window. Doing so brings up a toolbar at the top of the Excel window.

  6. Image titled Automate Reports in Excel Step 6

    6

    Click Record Macro. It’s in the toolbar. A pop-up window will appear.

  7. Image titled Automate Reports in Excel Step 7

    7

    Enter a name for the macro. In the «Macro name» text box, type in the name for your macro. This will help you identify the macro later.

    • For example, if you’re creating a macro that will make a chart out of your available data, you might name it «Chart1» or similar.
  8. Image titled Automate Reports in Excel Step 8

    8

    Create a shortcut key combination for the macro. Press the Shift key along with another key (e.g., the T key) to create the keyboard shortcut. This is what you’ll use to run your macro later.

    • On a Mac, the shortcut key combination will end up being Option+ Command and your key (e.g., Option+ Command+T).
  9. Image titled Automate Reports in Excel Step 9

    9

    Store the macro in the current Excel document. Click the «Store macro in» drop-down box, then click This Workbook to ensure that the macro will be available for anyone who opens the workbook.

    • You’ll have to save the Excel file in a special format for the macro to be saved.
  10. Image titled Automate Reports in Excel Step 10

    10

    Click OK. It’s at the bottom of the window. Doing so will save your macro settings and place you in record mode. Any steps you take from now until you stop the recording will be recorded.

  11. Image titled Automate Reports in Excel Step 11

    11

    Perform the steps that you want to automate. Excel will track every click, keystroke, and formatting option you enter and add them to the macro’s list.

    • For example, to select data and create a chart out of it, you would highlight your data, click Insert at the top of the Excel window, click a chart type, click the chart format that you want to use, and edit the chart as needed.
    • If you wanted to use the macro to add values from cells A1 through A12, you would click an empty cell, type in =SUM(A1:A12), and press Enter.
  12. Image titled Automate Reports in Excel Step 12

    12

    Click Stop Recording. It’s in the Developer tab’s toolbar. This will stop your recording and save any steps you took during the recording as an individual macro.

  13. Image titled Automate Reports in Excel Step 13

    13

    Save your Excel sheet as a macro-enabled file. Click File, click Save As, and change the file format to xlsm instead of xls. You can then enter a file name, select a file location, and click Save.

    • If you don’t do this, the macro won’t be saved as part of the spreadsheet, meaning that other people on different computers won’t be able to use your macro if you send the workbook to them.
  14. Image titled Automate Reports in Excel Step 14

    14

    Run your macro. Press the key combination which you created as part of the macro to do so. You should see your spreadsheet automate according to your macro’s steps.

    • You can also run a macro by clicking Macros in the Developer tab, selecting your macro’s name, and clicking Run.
  15. Advertisement

  1. Image titled Automate Reports in Excel Step 15

    1

    Download Kloudio’s Excel plugin from Microsoft AppSource. This will allow you to create a persistent connection between an external database or data source and your workbook. This plugin also works with Google Sheets.

  2. Image titled Automate Reports in Excel Step 16

    2

    Create a connection between your worksheet and your external data source by clicking the + button on the Kloudio portal. Type in the details of your database (database type, credentials) and select any security/encryption options if working with confidential or company data.

  3. Image titled Automate Reports in Excel Step 17

    3

    Once you’ve created a connection between your worksheet and your database, you will be able to query and build reports from external data without leaving Excel. Create your custom reports from the Kloudio portal and then select them from the drop-down menu in Excel. You can then apply any additional filters and choose the frequency that the report will refresh (so you can have your sales spreadsheet update automatically every week, day, or even hour.)

  4. Image titled Automate Reports in Excel Step 18

    4

    In addition, you can also input data into your connected worksheet and have the data update your external data source. Create an upload template from the Kloudio portal and you will be able to manually or automatically upload changes in your spreadsheet to your external data source.

  5. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

  • Only download Excel plugins from Microsoft AppSource, unless you trust the third party provider.

  • Macros can be used for anything from simple tasks (e.g., adding values or creating a chart) to complex ones (e.g., calculating your cell’s values, creating a chart from the results, labeling the chart, and printing the result).

  • When opening a spreadsheet with your macro included, you may have to click Enable Content in a yellow banner at the top of the window before you can use the macro.

Thanks for submitting a tip for review!

Advertisement

  • Macros can be used maliciously (e.g., to delete files on your computer). Don’t run macros from untrustworthy sources.

  • Macros will implement literally every step you make while recording. Make sure that you don’t accidentally enter the incorrect value, open a program you don’t want to use, or delete a file.

Advertisement

About This Article

Article SummaryX

1. Enable the Developer tab.
2. Click the Developer tab.
3. Click Record Macro.
4. Create a shortcut key.
5. Store the content in the current workbook.
6. Click OK.
7. Perform the steps you want to automate.
8. Click Stop Recording.
9. Use the shortcut key to run the same steps.

Did this summary help you?

Thanks to all authors for creating a page that has been read 543,765 times.

Is this article up to date?

Important: In Excel for Microsoft 365 and Excel 2021, Power View is removed on October 12, 2021. As an alternative, you can use the interactive visual experience provided by Power BI Desktop, which you can download for free. You can also easily Import Excel workbooks into Power BI Desktop. 

Abstract:    This is the third tutorial in a series. In the first tutorial, Import Data into Excel 2013, and Create a Data Model, you created an Excel workbook from scratch using data imported from multiple sources, and its Data Model was created automatically by Excel. The second tutorial,Extend Data Model relationships using Excel 2013, Power Pivot, and DAX, you learned how to extend the Data Model and created hierarchies within the data.

In this tutorial, you use that extended Data Model to build compelling reports that include multiple visualizations using Power View.

The sections in this tutorial are the following:

  • Create a Power View report

  • Create calculated fields for Power View and PivotTables

  • Set field defaults, table behaviors, and data categories

  • Checkpoint and Quiz

At the end of this tutorial is a quiz you can take to test your learning.

This series uses data describing Olympic Medals, hosting countries, and various Olympic sporting events. The tutorials in this series are the following:

  1. Import Data into Excel 2013, and Create a Data Model

  2. Extend Data Model relationships using Excel 2013, Power Pivot, and DAX

  3. Create Map-based Power View Reports

  4. Incorporate Internet Data, and Set Power View Report Defaults

  5. Power Pivot Help

  6. Create Amazing Power View Reports — Part 2

We suggest you go through them in order.

These tutorials use Excel 2013 with Power Pivot enabled. For guidance on enabling Power Pivot, click here.

Create a Power View report

In the previous tutorials, you created an Excel workbook with a PivotTable containing data about Olympic medals and events. If you didn’t complete the previous tutorial, you can download the workbook from the end of the previous tutorial from here.

In this section, you create a Power View report to visually represent the Olympics data.

  1. In Excel, click INSERT > Reports > Power View Reports.

    Insert a Power View report

  2. A blank Power View report appears as a sheet in the workbook.

    a blank Power View report in Excel

  3. In the Power View Fields area, click the arrow beside Hosts to expand it, and click City.

  4. Expand the Medals table, and click Sport. With this, Power View lists the Sport beside the city, as shown in the following screen.
    a new table in Power View

  5. In the FIELDS area of Power View Fields, click the arrow next to Sport and select Count (Not Blank). Now Power View is counting the sports, rather than listing them, as shown in the following screen.

    Creating a count of Sports, rather than a list

  6. On the ribbon, select DESIGN > Switch Visualization > Map. The DESIGN tab is only available if the Power View table is selected. You may get a warning about enabling external content when you switch to the Map visualization.

  7. A map replaces the table as the visualization. On the map, blue circles of varying size indicate the number of different sport events held at each Olympic Host location. But it might be more interesting to see which were summer events, and which were winter.

  8. To make the most use of the report area, let’s collapse the Filters area. Click the arrow in the upper right corner of the Filters area.

  9. In Power View Fields, expand Medals. Drag the Season field down to the COLOR area. That’s better: the map now displays blue bubbles for summer sports, and red bubbles for winter sports, as shown in the following screen. You can resize the visualization by dragging any of its corners.

    Create a map visualization

Now you have a Power View report that visualizes the number of sporting events in various locations, using a map, color-coded based on season. And it just took a few clicks.

Create calculated fields for Power View and PivotTables

Power View uses the underlying Data Model to create visualizations. With Power Pivot and DAX, you can extend the Data Model by creating custom formulas, then create reports based on those formulas and calculations in PivotTables and in Power View.


Create a calculated field in


Power Pivot

  1. In Excel, click Power Pivot > Data Model > Manage to display the Power Pivot window.

  2. Select the Medals table. Make sure the Calculation Area is displayed. The Calculation Area is found below the table data, and is used for creating, editing, and managing calculated fields. To view the Calculation Area, select Home > View > Calculation Area, as shown in the following screen.

    the Calculation Area botton in Power Pivot

  3. Let’s calculate the number of Olympic editions. In the Calculation Area, select the cell directly below the Edition column. From the ribbon, select AutoSum > Distinct Count, as shown in the following screen.

    create a Distinct Count in Power Pivot

  4. Power Pivot creates a DAX expression for the active cell in the Calculation Area. In this case, Power Pivot automatically created the following DAX formula:

    Distinct Count of Edition:=DISTINCTCOUNT([Edition])

    Additional calculations in AutoSum are just as easy, such as Sum, Average, Min, Max, and others.

  5. Save the Excel workbook. The Data Model is updated with the new calculated field. When you return to the Power View tab in Excel, a warning lets you know the Data Model has been updated, as shown in the following screen.

    A warning indicates the Data Model has changed

We’ll use this Distinct Count of Edition calculated field later on in the tutorials.


Create a calculated field using DAX in


Power Pivot

The AutoSum calculation is useful, but there are times when more customized calculations are required. You can create DAX formulas in the Calculation Area, just like you create formulas in Excel. Let’s create a DAX formula and then see how it appears in our Data Model, and as a result, is available in our PivotTable and in Power View.

  1. Open the Power Pivot window. In the Calculation Area, select the cell directly below the AutoSum calculation you completed in the previous section, as shown in the following screen.

    Create DAX formulas in the Calculation Area of Power Pivot

  2. Let’s calculate the percentage of all medals. In the formula bar, type the following DAX formula. IntelliSense provides available commands based on what you type, and you can press Tab to select the highlighted IntelliSense option.

    Percentage of All Medals:=[Count of Medal]/CALCULATE([Count of Medal],ALL(Medals))

  3. When you switch back to the Excel window, Excel lets you know the Data Model has been updated. In Excel, select the PivotTable in Sheet1. In PivotTable Fields, expand the Medals table. At the bottom of the fields list are the two calculated fields we just created, as shown in the following screen. Select Percentage of All Medals.

    PivotTable Fields shows Calculated Fields

  4. In the PivotTable, the Percentage of All Medals field appears after Count of Medal. It’s not formatted as a percentage, so select those fields (you can select them all at once, by hovering over the top of one of the Percentage of All Medals field, until the cursor becomes a down arrow, and then clicking). Once they’re selected, click HOME > Number > Percentage. In the same section of the ribbon, adjust the number of decimal places to two. Your pivot table looks like the following screen.

    PivotTable displays percentage data

In a previous tutorial, we filtered the Sports field to only the first ten, alphabetically, which is why we only see Aquatics through Boxing, and why the percentage in the Grand Total is 29.16%, rather than 100%. What this does tell us, of course, is that these first ten sports account for 29.16% of all medals awarded in the Summer games. We also can see that Aquatics accounted for 10.88% of all medals.

Since the Percentage of All Medals field is in the Data Model, it’s also available in Power View.

You can also create calculated fields from the Power Pivot tab while in Power View. Whether you create a calculated field in Power Pivot or while in Power View, the result is the same: the Data Model is updated to include the calculated field, and makes it available to all client tools.

Set field defaults, table behaviors, and data categories

Another way to streamline report creation in Power View is by setting a default field set. When you set a default field set for a table, you can simply click that table in Power View, and the default set of fields is automatically added to a new report.

In this section, you set defaults for your workbook that will save you time when creating reports.


Create the Default Field Set for a table

  1. The Power Pivot window should still be available. If not, click Power Pivot > Data Model> Manage. In Power Pivot, select Home > View > Data View to make sure Data View is selected. Select the Medals table.

  2. On the Advanced tab, click Reporting Properties > Default Field Set. A window appears that lets you specify default fields for tables created using client tools such as Power View.

  3. Select Sport, Event, EditionID, Athlete, and Medal in the left pane, and click Add -> to make them the default fields. Make sure they appear in the right pane, Default fields, in the order they were listed. The Default Field Set window looks like the following screen.

    the Default Field Set window

  4. Click OK to save the default field set for the Medals table.

  5. To see how this works, switch to the Power View sheet in Excel.

  6. Click anywhere on the blank report canvas, to make sure you don’t have an existing visualization selected. Your Power View sheet currently only has one visualization, which is the map you created earlier.

  7. In the Power View Fields list, click the Medals table name. Power View creates a table and automatically adds the five default fields from the Medals table, in the order you specified, as shown in the following screen. If you accidentally click on the triangle beside Medals, the table simply expands, rather than adding a new table with default fields.

    Power View table automatically includes default field sets


Set Table Behavior

You can also set the default table behavior, which Power View uses to automatically create report labels for the table. This becomes useful when you create visualizations from the same table, perhaps for many different reports. We use default table behavior in the next few steps, so let’s set it now.

  1. Back in Power Pivot, with the Medals table selected, select Advanced > Reporting Properties > Table Behavior. A window appears where you can specify table behavior.

  2. In the Table Behavior window, the Row Identifier is the column that contains only unique keys and no blank values. This is often the table’s primary key, but doesn’t have to be. You have to select a Row Identifier before making other selections in the window. Select MedalKey as the Row Identifier.

  3. In the Keep Unique Rows section, select AthleteID. Fields you select here have row values that should be unique, and should not be aggregated when creating Pivot Tables or Power View reports.

    Note: If you have trouble with reports that don’t aggregate how you want them to, ensure the field you want to aggregate is not selected in the Keep Unique Rows fields.

  4. For Default Label, select a key that should be used as a default report label. Select Sport.

  5. For Default Image, leave the selection as [No Column Selected], since you haven’t added images yet. The Table Behavior window looks like the following screen.

    the Table Behavior window

  6. Click OK. On the Power View sheet in Excel, select the table you created in the previous steps. From the ribbon, select DESIGN > Table > Card. The table you created changes into a collection of Cards; the data is the same, but the visualization of the data has changed. The table now looks like the following screen.
    Card visualizations with Table Behavior defaults

Notice that the Sport field is larger than the rest, and appears as a heading for each card. That’s because you set Sport as the Default Label in the Table Behavior window when you were in Power Pivot.


Set Data Categories for fields

In order for Power View to dynamically create reports based on underlying data, such as location, fields that contain such data must be properly categorized. For the Olympics data, let’s specify the categories for a few fields.

  1. In Power Pivot, select Hosts. Select the NOC_CountryRegion field. From Advanced > Reporting Properties > Data Category: click the arrow and select Country/Region from the list of available data categories, as shown in the following screen.

    Data Categories in Power Pivot

  2. In Medals, select the NOC_CountryRegion column. Again, change the Data Category to Country/Region.

  3. Return to Excel, and select the Power View sheet. Expand the Medals table in Power View Fields, and notice that the NOC_CountryRegion field now has a small globe icon beside it. The globe indicates that NOC_CountryRegion contains a geographic location, as shown in the following screen.

    geographic location icon in Power View Fields

We’ll use that geographic location in an upcoming tutorial. It’s time to save your work, review what you’ve learned, and then get ready to dive into the next tutorial.

Checkpoint and Quiz


Review what you learned

In this tutorial you learned how to create a map-based Power View visualization, then created calculated fields to extend your Data Model, and analyze the data in a different way. You also learned how to create default field sets for a table, which streamlined creating a new Power View table pre-populated with the default set of fields. You also learned how to define default table behavior, so the ordering and labeling of new tables was fast and consistent.

In the next tutorial in this series, you build on what you learned here. There’s a lot of data out there, and in the next tutorial, you add Internet data into your Data Model, and bring in images so that your Power View reports can really shine.

Here’s a link to the next tutorial:

Tutorial: Incorporate Internet Data, and Set Power View Report Defaults


QUIZ

Want to see how well you remember what you learned? Here’s your chance. The following quiz highlights features, capabilities, or requirements you learned about in this tutorial. At the bottom of the page, you’ll find the answers. Good luck!

Question 1: Where does Power View get its data to create Power View reports?

A: Only from worksheets included in Excel.

B: Only from the Data Model.

C: Only from data imported from external sources.

D: From the Data Model, and from any data that exists in the worksheets in Excel.

Question 2: Which of the following is true about a default field set?

A: You can only create one default field set for the entire Data Model.

B: In Power View, clicking the table name in Power View Fields creates a table visualization that is automatically populated with the its default field set.

C: If you create a default field set for a table, all other fields in that table are disabled.

D: All of the above

Question 3: Which of the following is true about Calculated Fields?

A: When you create them in Power Pivot, they appear in Power View as fields available in the table in which they were created.

B: If you create them in the Calculation Area of Power Pivot, they are hidden from all client tools.

C: When you create them in Power Pivot, they each appear as individual tables in all client tools.

D: Both A and B.

Question 4: In the Default Behavior Table window, if you select a field in Keep Unique Rows, which of the following is correct?

A: You must explicitly select “Sum this field” from Power View Fields in order to aggregate the field.

B: The field is always aggregated in Power View or PivotTables.

C: The field is never aggregated in Power View or PivotTables.

D: Selecting Keep Unique Rows has no effect on the behavior of the field in Power View or PivotTables.

Quiz an
swers

  1. Correct answer: B

  2. Correct answer: B

  3. Correct answer: A

  4. Correct answer: C

Notes: 

  • Data and images in this tutorial series are based on the following:

  • Olympics Dataset from Guardian News & Media Ltd.

  • Flag images from CIA Factbook (cia.gov)

  • Population data from The World Bank (worldbank.org)

  • Olympic Sport Pictograms by Thadius856 and Parutakupiu

Like this post? Please share to your friends:
  • Create a picture of a word
  • Create a number line with word
  • Create a newspaper in word
  • Create a new document in microsoft word
  • Create a form letter in word