+ Reply to Thread
Results 1 to 6 of 6

Counting Unique rows in a pivot table

  1. #1
    Registered User
    Join Date
    10-09-2017
    Location
    Stavanger, Norway
    MS-Off Ver
    O365
    Posts
    78

    Counting Unique rows in a pivot table

    I've googled the issue without any great success. Perhaps someone here can help.
    I have a Data Connection and the data is added to the Model, I have then inserted a PIVOT TABLE to display a selection of the data. This all works fine. I'd like a cell above the PIVOT TABLE to contain the number of unique entries in one of the columns (not the count of Values.)

    I'm also using a slicer to filter the table and would liek to count to reflect the filtered table

    Several formulas I've tried work on the unfiltered data but fail when I apply a filter with the slicer.

    ... any suggestions.

    Thanks

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,915

    Re: Counting Unique rows in a pivot table

    UNIQUE should work with or without slicers, though you will need to use a range large enough to include the maximum amount of rows in the pivot table.
    Rory

  3. #3
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Counting Unique rows in a pivot table

    Create a new pivot table adding to the Model, just use the field with unique values to do a distinct count so you will see only the header and the total, then go to Pivot Table Analysis click in the OLAP Tools button, select Convert to Formula.
    With this new cube formula go to the header copy the formula and go back to the value cell and substitute the cell reference in it. Now you will have an independent calculation of you Pivot Table unique value.

  4. #4
    Registered User
    Join Date
    10-09-2017
    Location
    Stavanger, Norway
    MS-Off Ver
    O365
    Posts
    78

    Re: Counting Unique rows in a pivot table

    DJunqueira ...Excellent !!... I never cease to be amazed at what is possible. This was exactly what I was looking for... many thanks

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: Counting Unique rows in a pivot table

    Fantastic solution, DJunqueira! Here is a Rep for you!

  6. #6
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Counting Unique rows in a pivot table

    Thank you both, happy to help.

+ 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: 10
    Last Post: 05-12-2014, 10:51 PM
  2. Counting unique items from different columns using pivot table
    By F16Stevie in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 06-14-2013, 04:13 AM
  3. Replies: 1
    Last Post: 11-29-2012, 06:24 PM
  4. Pivot Table - Counting Amount of Certain Rows
    By heather1209 in forum Excel General
    Replies: 0
    Last Post: 07-24-2012, 06:19 PM
  5. [SOLVED] Excel 2007 : Counting with a pivot table (groups not individual rows)
    By benoj2005 in forum Excel General
    Replies: 12
    Last Post: 04-30-2012, 03:24 AM
  6. Replies: 0
    Last Post: 11-16-2011, 12:39 PM
  7. Pivot Table summary counting 2 rows as 1
    By broncoboaz in forum Excel General
    Replies: 0
    Last Post: 12-16-2010, 12:35 PM
  8. Counting rows in Pivot table column
    By nailers67 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-08-2006, 02:10 PM

Tags for this Thread

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