+ Reply to Thread
Results 1 to 5 of 5

grouping 2 columns to see totals in pivot chart

  1. #1
    Registered User
    Join Date
    08-31-2013
    Location
    Texas
    MS-Off Ver
    365 v2106
    Posts
    6

    Question grouping 2 columns to see totals in pivot chart

    I work for a city and I need to track collisions to spot problem areas. I have a table that has a column for the reported (primary street) and a column for an intersecting (secondary street). Depending on how its entered by police officers, Main St. could end up in either column. So if I have 5 collisions say Main street & 3rd, Main & Walter, Walter & MLK, MLK & Main, 3rd & Main; I would like the pivot table to List Main St once with total of 4 instances, 3rd = 2, Walter = 2, MLK =2, etc.

    Also is there a way to do a pivot table that groups by intersection no matter which street is primary? So it would list Main Street & 3rd and would have 2 instances.

    Sorry if this is the wrong place or if it's been answered before, I have no clue what to search because everything I've thought of to search doesn't come close to what I'm needing. Thanks
    Last edited by $excel=looneybin$; 07-16-2021 at 09:54 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: grouping 2 columns to see totals in pivot chart

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-31-2013
    Location
    Texas
    MS-Off Ver
    365 v2106
    Posts
    6

    Re: grouping 2 columns to see totals in pivot chart

    Sorry, didn't realize that was required. Here is the file. All info is public information.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: grouping 2 columns to see totals in pivot chart

    Using Power Query which is called Get and Transform in your version of Excel, here is the Mcode to get the results shown in the attached file

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-31-2013
    Location
    Texas
    MS-Off Ver
    365 v2106
    Posts
    6

    Re: grouping 2 columns to see totals in pivot chart

    Thank you so much! It would have taken me weeks to figure out what I needed to use and then weeks to learn it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create a pivot table/chart with both daily totals and running totals
    By plasteredric in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-14-2020, 07:23 PM
  2. PIVOT CHART grouping with Date
    By slangille35 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-15-2019, 02:41 PM
  3. Pivot Chart Date Grouping
    By Fenrir1016 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-17-2018, 10:05 AM
  4. Totals and % of Totals under certain columns in Pivot Table
    By adrenom in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-13-2016, 02:16 PM
  5. Replies: 1
    Last Post: 07-22-2015, 07:16 AM
  6. [SOLVED] A macro for grouping of same values of several columns and totals
    By novice_excel_2012 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-03-2012, 07:09 AM
  7. Grouping Dates into Monthly Totals - Pivot Table.
    By samprince in forum Excel General
    Replies: 3
    Last Post: 10-11-2006, 09:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1