+ Reply to Thread
Results 1 to 4 of 4

Grouping multiple columns as single series for pivot table

  1. #1
    Registered User
    Join Date
    06-30-2019
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    2

    Grouping multiple columns as single series for pivot table

    Hi all,
    Hoping you can help me out. I need to merge multiple columns into a single series for use in a pivot table and chart.
    See below:

    Data source (table):
    Example.png

    Pivot table and chart:
    Example 2.png

    As you can see, each patient (defined as a unique row in data source) will have multiple Dates of Service (DOS) over the course of their treatment. I need to be able to tally how many patients appeared at each date of service. In this case, the patient must be counted as a unique count for each DOS. For example, patient John Smith needs to be counted twice - once in the DOS 4/23 count, and again in the DOS 7/22 count.

    What is the most efficient way to do this? Is it even possible ?

    Thank you in advance and happy to clarify further if my explanation was not clear.
    Attached Images Attached Images

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

    Re: Grouping multiple columns as single series for pivot table

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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
    06-30-2019
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Grouping multiple columns as single series for pivot table

    Hi Alan,

    Thank you for the prompt response. I have attached a sample size of n=100 to work with. My ultimate goal is to be able to create the pivot table and chart in the DESIRED_OUTCOME tab directly from the SourceDATA tab without having to do a manual step (DATA_MANUAL)
    In the future, these individuals may have a third date of service, so you can imagine the time saved if I can simply add a column to the source data.

    Thank you and hoping you can help

    PS all confidential data has been replaced with dummy 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 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Grouping multiple columns as single series for pivot table

    Using Power Query I was able to unpivot the two columns of Service and then save the results to Power Pivot and then this allowed the creation of Pivot Chart. Any changes to the original data (ie. adding a new column) was automatically unpivoted and the end result transferred to Power Pivot after clicking on the refresh button. File is attached.
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 07-22-2015, 07:16 AM
  2. Pivot Table Grouping Columns
    By ldewson86 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-21-2015, 08:45 AM
  3. Grouping multiple columns into one field for Pivot Table
    By Zyphon in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 02-02-2013, 11:07 AM
  4. Having Pivot Table Columns Stop Grouping
    By Excel"*" in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-07-2012, 04:35 AM
  5. Replies: 2
    Last Post: 05-03-2012, 01:18 PM
  6. Grouping Columns in a Pivot Table
    By prr in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 12-10-2009, 05:03 AM
  7. [SOLVED] programmatic grouping of columns in pivot table
    By Jerry in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2006, 04:25 PM

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