+ Reply to Thread
Results 1 to 7 of 7

Pivot Table fields based on two counted fields

  1. #1
    Registered User
    Join Date
    01-14-2014
    Location
    Auburn Hills MI
    MS-Off Ver
    Excel 2010
    Posts
    3

    Pivot Table fields based on two counted fields

    Hi All,

    First time poster!

    Having some trouble with pivot tables, the problem description along with a snippet of source data and my pivot table is in the attached sheet. Your help is greatly appreciated!

    Thank you,
    Tejas.
    Attached Files Attached Files

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Pivot Table fields based on two counted fields

    I think you must add two new columns to your data:
    Quote: simple value 1 for every row
    PO: =IF(E4<>"",1,0)

    You may then sum these fields in the pivot table instead of using Count on the number fields.
    Then you may add a calculated field using ='PO'/'Quote'
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Pivot Table fields based on two counted fields

    Hi Tejas and welcome to the forum,

    You may or may not like this answer. See the attached. You are trying to do a Pivot Table with some data and then do a normal (easy) formula with the Pivot Table's answers.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    01-14-2014
    Location
    Auburn Hills MI
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Pivot Table fields based on two counted fields

    Thanks Marvin, this seems like a simple solution that does the trick! The only trouble with this is that i cant sort the customers by the conversion rate (i have thousands of customers in my actual sheet) and when i expand the customer field, the column kinda goes beserk. But it's good to get an overview on the pivot table!

    Just wondering, how did you use the formula outside the pivot table without using the getpivotdata() function?

    Thanks again!

    Quote Originally Posted by MarvinP View Post
    Hi Tejas and welcome to the forum,

    You may or may not like this answer. See the attached. You are trying to do a Pivot Table with some data and then do a normal (easy) formula with the Pivot Table's answers.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Pivot Table fields based on two counted fields

    Hi,

    I just typed in the cell letter and number to create the formula outside the pivot table.

    I've seen people who would then copy and paste (values only) the pivot table to a new sheet. You could then sort by the ration column. Not a great answer but will work with some effort.

  6. #6
    Registered User
    Join Date
    01-14-2014
    Location
    Auburn Hills MI
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Pivot Table fields based on two counted fields

    Huh, makes me feel silly for using the getpivotdata() function all these years, guess you learn something new every day!

    Thanks for your help.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Pivot Table fields based on two counted fields

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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 display/formatting hide fields not being counted
    By oamrt in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-28-2012, 10:22 AM
  2. Replies: 5
    Last Post: 06-08-2012, 03:24 PM
  3. How to Disable automatic fields in pivot table like total and count on fields
    By anushka in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2009, 07:53 AM
  4. Differentiate between column fields and data fields in a pivot table
    By whiteheadw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 01:59 PM
  5. [SOLVED] Calculated Field in Pivot Table Based on Two Counted Fields
    By cmlits in forum Excel General
    Replies: 1
    Last Post: 03-30-2006, 12:50 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