+ Reply to Thread
Results 1 to 3 of 3

Pivot challenge - pivots without cross classification

  1. #1
    Registered User
    Join Date
    08-01-2014
    Location
    720
    MS-Off Ver
    2010
    Posts
    2

    Pivot challenge - pivots without cross classification

    Hi All,

    In a discussion on moving to SAS Visual Analytics I, very foolishly, said “why don’t you do it in a pivot table?” And now I’m faced with eating my hat to the SA VA guys, or finding a solution, using a pivot table.

    The data is structured as follows:

    ID, Category1, Category2, Category3
    1, Yes, Yes, No
    2, No, No, Yes
    3,,,
    4, Yes, Yes, No

    The output is the proportion of each category which are “Yes”, to all “Yes” and “No” values. Using the above example:

    Category1 Category2 Category3
    66% 66% 33%

    While I can achieve this using DCOUNTS and formula, I cannot for the life of me work out how to create this simple seeming output using a pivot.

    Interestingly, so far the SAS VA guys can only do this by converting the “Yes” and “No” values to 0 and 1s, but even doing this I can only get the denominators, without being able to divide them by the correct numerator in the pivot table.

    Any ideas?

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Pivot challenge - pivots without cross classification

    Hi,

    Welcome to the Forum.

    I could achieve the desired result by adding a new column for "No"s in each category. Please see the attached file.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-01-2014
    Location
    720
    MS-Off Ver
    2010
    Posts
    2

    Re: Pivot challenge - pivots without cross classification

    Hi cbatrody, thanks for your solution, it might have some applications if I were building a new dataset.

    The data structure I put up is a simplification and if possible a solution which doesn't involve manipulating the data outside of a pivot would be best.

    Even the conversion to 0 and 1 values in the same cell is a step further that I would like to take.

    P.

+ 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. Pivot Table Help - This could be a challenge
    By ioswoody in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 11-13-2013, 10:10 AM
  2. PIVOT update of all PIVOTS in all Worksheets
    By eramsva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2012, 09:30 AM
  3. Why do Pivots display pivot item tick boxes that are not visible in the pivot?
    By davellll in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2009, 12:53 PM
  4. Macro to COUNT for Pivot and Refresh Pivots
    By Slomaro2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2008, 12:21 PM
  5. Link pivot field to other pivots
    By TomBP in forum Excel General
    Replies: 1
    Last Post: 04-07-2008, 12:42 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