+ Reply to Thread
Results 1 to 2 of 2

Varying date periods and binary values in a pivot table

  1. #1
    Registered User
    Join Date
    11-21-2017
    Location
    Hong Kong
    MS-Off Ver
    2013
    Posts
    21

    Varying date periods and binary values in a pivot table

    This forum has been tremendously informative and I wonder if the experts here can provide advice. I have a project that I try to represent in the attached sample.

    There are customers at different companies asked to provide a feedback score on service provided over a period. However some do this for each quarter, some each half, some only annually, some both quarterly and annually, some don't bother, etc.

    I'm trying to summarise in a table:

    - Was a score received from a company (Y/N)? >>Should I do this with a calculated item?

    - What was the most recent period when a score was received? E.g. if there are scores for Q1 2020, H1 2020 and FY 2020, FY 2020 would somehow need to be assessed the most recent (based on end date of that period).

    - As a bonus, I'd like to be able to return in adjacent columns the names of customers who provided a score

    Any suggestions massively appreciated.
    Attached Files Attached Files
    Last edited by winkywright; 02-11-2021 at 03:55 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Varying date periods and binary values in a pivot table

    This is messy, but it works with the help of some helper columns in the source data.

    The first thing we need to do i figure out the end dates for the quarters, halves and FY. I assume the FY ends on October 31. So I set up a table in columns T-V to define these things.

    Then I calculated the end date in the period in column F: =DATE([@Year],VLOOKUP([@Period],Table_Period,2,FALSE),VLOOKUP([@Period],Table_Period,3))

    I also calculated the maximum date for the customer + client combination (Columns G and I). and checked tp see if a particular record contained the max date (Column J)

    Then I noticed that there were duplicate records, so I flagged these (columns H and K) =MATCH([@[Composite 2]],[Composite 2],0)=ROW()-1 <- this formula is true only for the first instance of the composite subsequent occurrences are false). So I am only counting the first rating.

    Finally, there were people who did not submit a rating, so Column L takes care of them.

    I took the liberty of swapping the columns and rows so people go down and companies and dates go across.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. [SOLVED] Unable to analyse table with binary and multiple choice data with a pivot table
    By mark1987__ in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-14-2020, 02:03 PM
  2. [SOLVED] Pivot Table Count Combinations Binary Numbers
    By raychow22 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-17-2020, 06:08 PM
  3. Calculating average from every nth row across varying periods
    By yaro_yaro in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-01-2019, 02:47 PM
  4. Calculating maximum of moving average values across varying periods
    By yaro_yaro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-11-2019, 07:06 AM
  5. [SOLVED] Pivot table with slicers for scenarios and periods
    By Gti182 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-23-2018, 06:37 AM
  6. [SOLVED] Get values from varying rows and columns of Pivot Table and enter those in different table
    By Richavlaues in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2016, 10:24 AM
  7. IRR with varying hold periods
    By kmorque in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-02-2009, 03:04 AM

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