+ Reply to Thread
Results 1 to 16 of 16

Unique values in Pivot tables

  1. #1
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Unique values in Pivot tables

    Hello;

    I have a data from which I have a report as a pivot table.
    The data looks something like this:

    Col1 Col2 Col3
    A 10 12
    A 20 12
    A 30 12
    B 10 14
    B 15 14
    B 17 14
    C 20 15
    C 30 15

    There are more columns, this is just as a sample.
    I'd like to report in the pivot something like the following:
    A 12
    B 14
    C 15

    Is there any way to do it?
    I cannot sort the original data by unqiue values before. Pivot table gets dynamically updated and I need to keep the data this way.

    Many-many thanks!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Unique values in Pivot tables

    If the relationship between Column 1 & Column 3 is 1:1 then use Average rather than Sum in the Pivot re: Column 3

  3. #3
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    I have tried. Th relationship is 1:1, but the problem now that since I don't necessarily have numbers in Col 3, and I can have some text, so when I use average I get #DIV/0!


  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Unique values in Pivot tables

    Quote Originally Posted by ekat
    ...the problem now that since I don't necessarily have numbers in Col 3, and I can have some text, so when I use average I get #DIV/0!
    What were you hoping to return in these cases ?
    The Data Field of a Pivot can (but for a few formatting exceptions) only display numbers.

    It might be worth posting a sample file with some source data and "desired" results.

  5. #5
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    Quote Originally Posted by DonkeyOte View Post
    What were you hoping to return in these cases ?
    The Data Field of a Pivot can (but for a few formatting exceptions) only display numbers.

    It might be worth posting a sample file with some source data and "desired" results.
    Sorry, I am not an expert and learnign things. Thanks for telling me that it can only displays numbers.

    I attached the sample. In my example eve if I add the count for each person, if I take the average, then I get one person on the 1 floor and 1 person on the second floor, which is not correct for me.
    Attached Files Attached Files

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Unique values in Pivot tables

    Do you actually need a data field?
    Remember what the dormouse said
    Feed your head

  7. #7
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    Unfortunately I do.

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Unique values in Pivot tables

    Why? You don't appear to be using one from what I've seen, so two row fields would produce the list you seem to want.

  9. #9
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    I am not using them in this specific pivot table, btu I have other ones. Also I'm nto sure what two rows fields you are talkign about.

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Unique values in Pivot tables

    As in the attached.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    Quote Originally Posted by romperstomper View Post
    As in the attached.
    Thank you, but this I can do as well. As in my sample I am trying to make a report which would contain a floor number with a count of persons per floor, using their unique names.

    Please, see my sample above.

  12. #12
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Unique values in Pivot tables

    That workbook is your sample above, with a pivot added to it. I can't see what exactly you want returned - I assumed it was what you had on the Vlookup sheet, but obviously not.

  13. #13
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    Quote Originally Posted by romperstomper View Post
    That workbook is your sample above, with a pivot added to it. I can't see what exactly you want returned - I assumed it was what you had on the Vlookup sheet, but obviously not.
    I didn't have any vlook sheet.

  14. #14
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    Quote Originally Posted by romperstomper View Post
    That workbook is your sample above, with a pivot added to it. I can't see what exactly you want returned - I assumed it was what you had on the Vlookup sheet, but obviously not.
    Please see the first sample I have attached.
    I also said: "In my example even if I add the count for each person, if I take the average, then I get one person on the 1 floor and 1 person on the second floor, which is not correct for me."

    As you see I would like to return a number of people per floor number. I am not sure which sample you were referring to, but I did not have any vlookup in my sample and I also already had a pivot table in it.

  15. #15
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Unique values in Pivot tables

    Are you sure? The link above is to a file that has no pivot in it and it does have a vlookup sheet. Either that or my browser and copy of Excel have gone nuts.

  16. #16
    Registered User
    Join Date
    09-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Unique values in Pivot tables

    Quote Originally Posted by romperstomper View Post
    Are you sure? The link above is to a file that has no pivot in it and it does have a vlookup sheet. Either that or my browser and copy of Excel have gone nuts.
    err... I'll just reattached my sample. Sorry, I am not sure what happened. Probably my mistake.
    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)

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