Excel For Apple Mac Tabluar View Vs Outline Pivot Table

Posted on  by 

  1. Excel For Apple Mac Tabular View Vs Outline Pivot Tablet
  2. Excel For Apple Mac Tabular View Vs Outline Pivot Table Example
  3. Excel For Apple Mac Tabular View Vs Outline Pivot Tables

Click any cell inside the pivot table. On the Analyze tab, in the Tools group, click PivotChart. The Insert Chart dialog box appears. Below you can find the pivot chart. This pivot chart will amaze and impress your boss. Note: any changes you make to the pivot chart are immediately reflected in the pivot table and vice versa. A pivot table is an interactive table that lets you group and summarize data in a concise, tabular format. To create a pivot table, click the Insert tab, and then click the PivotTable icon on the toolbar. You can enter your data range manually, or quickly select it by dragging the mouse cursor across all cells in the range, including the. Pivot Tables are absolutely essential tools for data exploration in Excel, allowing you to instantly sort, filter, and analyze your data while keeping your source tables intact. Consider this course a master class in Pivot Tables and Pivot Charts. And probably Power Query to convert the data into a tabular format and then load into Power Pivot, which is not constrained by the 1.5M row limit of Excel worksheets. You absolutely must convert your data to tabular, from there you can use Power Pivot to create the summaries etc.

July 10, 2018 - by Bill Jelen

Can you build a pivot table with text in the values area? Susan from Melbourne Florida has a text field and wants to see the before and after of that text.

Traditionally, you can not move a text field in to the values area of a pivot table.

However, if you use the Data Model, you can write a new calculated field in the DAX language that will show text as the result.

  1. Make sure your data is Formatted as Table by choosing one cell in the data and pressing Ctrl + T. Make a note of the table name as shown on the Table Tools tab of the ribbon.
  2. Insert, Pivot Table. Choose 'Add This Data to the Data Model' while creating the pivot table.

  3. Drag fields to the Rows and Columns of the pivot table.

  4. To add the text to the values area, you have to create a new special kind of calculated field called a Measure. Look at the top of the Pivot Table Fields list for the table name. Right-click the table name and choose Add Measure.

    Note

    If you do not have this option, then you did not choose Add This Data To The Data Model in step 2.

  5. Type a field name of ListOfCodes
  6. The formula is =CONCATENATEX(Table1,Table1[Code],', ')
  7. Leave the format as General
  8. Click Check DAX Formula to make sure there are no typos

  9. Click OK. The new measure will appear in the field list.

  10. When you drag ListOfCodes to the Values area, you will see a list of codes for each cell in the values area.

Note

It is probably important to remove grand totals from this pivot table. Otherwise, the intersection of the Grand Total Row and Grand Total Column will list all of the codes in the table separated by columns. You can go to PivotTable Tools Design, Grand Totals, Off for Rows and Columns.

Amazingly, as you re-arrange the fields in Rows & Columns, the CONCATENATEX updates.

After using this method for a few weeks, I and others noticed that in some data sets, the concatenated values would contain duplicates, such as the Fig, Fig data shown in the East region above. Thanks to Rob Collie at PowerPivotPro.com, you can remove the duplicates by changing

=CONCATENATEX(Table1, Table1[Code], ”, “)

to

=CONCATENATEX(Values(Table1[Code]), Table1[Code], ', ')

The VALUES function returns a new table with the unique values found in a column.

Watch Video

Download Excel File

To download the excel file: pivot-table-with-text-in-values-area.xlsx

Tables

The DAX formula language allows many new calculations in a pivot table.

Excel Thought Of the Day

I've asked my Excel Master friends for their advice about Excel. Today's thought to ponder:

'Excel conquers all'

Double-click a pivot table value, to create a new sheet with the records used in that total. That is Excel's DrillDown (Show Details) feature. Use macros to name the sheets, and ask if you want to delete them when closing the workbook.

Show Records With DrillDown

When you summarize your data by creating an Excel Pivot Table, each number in the Values area represents one or more records in the pivot table source data. In the screen shot below, the selected cell is the total count of new customers for the East region in 2014.

Does a number look too high or too low? A quick way to see those records is to use the Show Details (DrillDown) feature -- double-click on that cell. A new worksheet is automatically inserted, with a list of those 'East 2014' records.

How to Extract Pivot Table Records

In the sample pivot table shown above, new customer counts are shown by year and by state. To see the customer details for any number in the pivot table, use the Show Details feature.

To see the underlying records for a number in the pivot table:

  1. In the Pivot Table, right-click the number for which you want the customer details.
  2. In the pop-up menu, click Show Details

TIP: Instead of using the Show Details command, you can double-click on a Values cell.

The related customer records are extracted to a new worksheet in the workbook. These are the 15 new customers from the East region in 2014.

NOTE: The table is based on the Default Table Style in your workbook, and the cells are in Normal cell style. There are instructions on my Pivot Table blog for adjusting those settings.

DrillDown Warnings

There are a couple of things to keep in mind when you use the DrillDown (Show Details) feature.

Not Connected to Source Data

The extracted records are copies of the original records in the pivot table source data. They are not linked to the original records or to the pivot table. If you want to change the data, go to the original source data, and make the change there.

Problem With Slicers

If you have Slicers connected to the pivot table, the DrillDown list might not show the set of records that you expect. This problem occurs in Excel 2010 and Excel 2013, and is fixed in Excel 2016.

Excel for apple mac tabular view vs outline pivot tablet

In those versions of Excel, you should include all the Slicer fields in the pivot table too, if you plan to use the DrillDown feature. Otherwise, the Slicer filter will be ignored in the DrillDown results.

For example, in the screen shot below, the Severity field is a Slicer, and also in the pivot table. Priority is a Slicer, but is not in the pivot table. If you double-click on cell G6, it should show 2 records on the DrillDown sheet. However, it incorrectly shows 8 records - all of the Priority values are included, not just the '20' priorities that are filtered in the Slicer.

Watch this video to see the problem, and how to add all the Slicer fields to the pivot table, to fix the problem.

Macro to Name Show Details Sheets

When you use the Show Details command, it adds a new worksheet, and your workbook can quickly fill up with the data details sheets. When you're closing the workbook, you probably want to clear out all the extra sheets, so they don't clutter up the workbook.

With the following macro, you can automatically name the sheets created by the Show Details feature, so they are easy to identify. The code adds 'XShow_' to the sheet name.

NOTE: This code is in the Basic download file. There is also a Custom download file, with more options for naming and deleting the drilldown sheets.

That makes it easy for you identify and delete those sheets. Or, use the code in the Delete Sheets section, to automatically delete the sheets before closing the workbook.

Create a Public Variable

First, you will add a code module to the workbook, and create a public variable there.

  1. On the keyboard, press Alt + F11, to open the Visual Basic Editor (VBE).
  2. In the VBE, click the Insert menu, and click Module.
  3. At the top of the module, where the cursor is flashing, type the following line of code to create a public variable. This variable can be used by other procedures in the workbook.

Create the Double-Click Macro

Next, you will add code that runs when you double-click a cell on the pivot table sheet. Follow these steps to add that code.

NOTE: If your workbook has multiple pivot table sheets:

  • Put this code on each pivot table sheet.
  • OR, download the Multi-Pivot sample file, with the code on the ThisWorkbook module

Warning: A code module can contain only one copy of each event, such as the Worksheet_BeforeDoubleClick event. If your worksheet already contains a Worksheet_BeforeDoubleClick event, you could combine this code with your existing code.

  1. Copy the following code
  2. Right-click the pivot table's worksheet tab, and then click View Code. That opens the Visual Basic Explorer (VBE).
  3. Paste the copied code onto the worksheet module, below the Option Explicit line (if there is one), at the top of the code module
  4. (optional) Paste the copied code onto the worksheet module for any other pivot tables in your workbook
  5. Leave the VBE open, for the next step.

How the Double-Click Macro Works

When you double-click a cell on the pivot table sheet, the BeforeDoubleClick event runs automatically. It is called an Event Procedure, because it is triggered by a specific action (event)..

If the cell that you double-clicked is in the Values area (pt.DataBodyRange) of a pivot table, the procedure is the public varible, SheetType, is set to a value of Show.

Add the Workbook Event Code

The Double-Click code, shown above, identifies the Show Details worksheets. Next, you'll add a macro (event procedure) to the Workbook's module.

It will run when a new sheet is added to the workbook.

  1. Copy the following code.
  2. In the VBE, you should see a list of workbooks at the left , in the Project Explorer.
  3. Find your workbook in that list, and click the + sign at the left of its name, if necessary, to see the Microsoft Excel Objects.
  4. Double-click the ThisWorkbook object for your workbook, to open its code module.
  5. Add the copied code to the workbook module, below the Option Explicit line (if there is one) at the top of the code module:
  6. Leave the VBE open, if you also want to add the Delete sheets code

How the New Sheet Macro Works

If the worksheet double-click creates a new sheet, the workbook's NewSheet event code runs.

If the SheetType variable is set to the value of Show, the sheet is given a name that starts with XShow_.

This makes the sheets easy to identify, and they can be deleted manually or automatically when the workbook closes.

Delete Drilldown Sheets Automatically

If you use the code shown above, to name the drilldown worksheets, you can also use code to automatically delete those sheets, when closing the workbook.

NOTE: This code is in the Basic download file. There is also a Custom download file, with more options for naming and deleting the drilldown sheets.

Follow these steps to add the code that deletes them.

  1. In the VBE, in the Project Explorer, double-click the ThisWorkbook object for your workbook.
  2. Add the following code to the workbook module, below the New Sheet code that you added earlier.

How the Delete Sheets Macro Works

When the workbook is closing, the macro runs automatically.

First the macro looks for any Drill Down sheets -- their names start with 'XSHOW'.

If there are any Drill Down (Show Detail) sheets, you will see a message box, asking if you want to delete them.

Click Yes, if you want to delete them.

Excel For Apple Mac Tabular View Vs Outline Pivot Tablet

Tables

Then, click Save, when prompted, to save and close the workbook.

Add Macros to Workbook

The instructions on this page show all the steps to create the Basic code for the pivot table Drilldown macros. If you'd rather not start from scratch, download one of the sample workbooks -- Basic or Custom.

Here are the steps to start copying the code from the sample workbooks into your workbook:

  1. Open the sample workbook, and the workbook where you want to copy the code
  2. Be sure that your workbook is saved as xlsm or xlsb format, or the macros will not be saved
  3. On the keyboard, press Alt + F11, to open the Visual Basic Editor (VBE).
  4. In the Project Explorer at the left, find the sample file, and your workbook
  5. If necessary, click the + signs, to see the Microsoft Excel Objects and Modules for the 2 workbooks
  6. From the sample file, in the Modules folder, drag the module (named Module or modVar) onto your workbook (drop it anywhere)

Next, follow these steps to get the Workbook code

WARNING: These steps assume that there is no existing code on the ThisWorkbook module in your workbook.

  1. In the sample file, right-click on ThisWorkbook, and click View Code
  2. Click in the code window, and press Ctrl+A to select all the code
  3. Press Ctrl+C to copy all the code
  4. For your workbook, , right-click on ThisWorkbook, and click View Code
  5. If there is an Option Explicit line at the top of the code window, delete that
  6. Click in the code window, and press Ctrl+V to paste all the code

Next, follow these steps to get the Pivot Sheet code

WARNING: These steps assume that there is no existing code on the pivot table sheet modules in your workbook.

  1. In the sample file, right-click on pivot table sheet, and click View Code
  2. Click in the code window, and press Ctrl+A to select all the code
  3. Press Ctrl+C to copy all the code
  4. For your workbook, , right-click on ThisWorkbook, and click View Code
  5. If there is an Option Explicit line at the top of the code window, delete that
  6. Click in the code window, and press Ctrl+V to paste all the code
  7. (optional) Paste the code onto all the other pivot table sheets in your workbook

For the Custom sample file ONLY:

If you are using the Custom file, follow this step to get the Settings worksheet. This is NOT required in the Basic file.

  1. Close the Visual Basic Editor and go back to Excel.
  2. In the sample file, right-click on tab for the Admin_Drill sheet, and click Move or Copy
  3. In the drop down list, choose the workbook where you are adding the drilldown code
  4. In the Before Sheet list, choose a location for the Admin_Drill sheet
  5. IMPORTANT: Check the box to Create a Copy
  6. Click OK, to copy the sheet to your workbook

Note: This step will also add named ranges to your workbook, which you can see in the Name Manager.

Test the Code

After you copy all the code, and the Admin_Drill sheet (Custom file), close the Visual Basic Editor.

Go to one of the pivot table sheets in your workbook, and double-click a Value cell, to create a drilldown sheet. If all the code was installed correctly, the drilldown sheet should have the special prefix.

If you used the Custom file code, you can go to the Admin_Drill sheet, and adjust the settings.

Download the Sample Workbook

IMPORTANT: See the Add Macros to Workbook section above, for the steps to copy the code from the sample files into your workbook.

Excel for apple mac tabular view vs outline pivot table setting

Excel For Apple Mac Tabular View Vs Outline Pivot Table Example

  1. Basic: To see how the event code names the sheets, and deletes them when closing, download the Pivot Table Drilldown sample file. The zipped file is in xlsm format, and contains macros. Enable macros when you open the file, if you want to test the macros.
  2. Custom: For more options on naming and deleting the drilldown sheets, download the Pivot Table Custom Drilldown sample file. The zipped file is in xlsm format, and contains macros. Enable macros when you open the file, if you want to test the macros. See details on my Contextures Blog.
  3. Multi Pivot: If your workbook has multiple pivot table sheets, download the Pivot Table Drilldown Workbook sample file. This has the basic drilldown code, and instead of adding the double-click event procedure on each sheet, that code is in the ThisWorkbook code module.

Excel For Apple Mac Tabular View Vs Outline Pivot Tables

More Pivot Table Resources

Coments are closed