+ Reply to Thread
Results 1 to 6 of 6

Count unique values across multiple columns

  1. #1
    Registered User
    Join Date
    03-11-2021
    Location
    Colchester, England
    MS-Off Ver
    Office 365
    Posts
    27

    Count unique values across multiple columns

    Hi there,

    I realise this is probably a very common query, but am unable to get my intended results with my data set!!

    I would like to count the unique values based on three sets of criteria - the 'site name' column, the 'plot(s)' column, and the 'transaction type' column. Only one of these has an intended criteria result (transaction type) whilst the other two it's just a case of finding unique values.

    I've highlighted this in the attached and put my intended result below the orange cells. As this is being used across a fair-sized data set, I would also like these results to update when filtering my table, if possible.

    Hopefully, this makes sense!

    Thanks in advance,

    Luke
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: Count unique values across multiple columns

    Since you are using 365, you can solve using Power Query

    Please Login or Register  to view this content.
    Excel 2016 (Windows) 32 bit
    A
    B
    1
    TRANSACTION TYPE Count
    2
    Day Rate
    12
    3
    Decoration
    7
    4
    External
    2
    5
    Mist Coat
    4
    6
    Supervision
    1
    Sheet: TRACKER2 04910


    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Count unique values across multiple columns

    Unique list transaction type


    I7=SORT(TRANSPOSE(UNIQUE(TRACKER2.04910[TRANSACTION TYPE])))


    I8=COUNTA(UNIQUE(FILTER($G$15:$G$100&$H$15:$H$100,$I$15:$I$100=I$7)))

    Copy across
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-11-2021
    Location
    Colchester, England
    MS-Off Ver
    Office 365
    Posts
    27

    Re: Count unique values across multiple columns

    This is brilliant - thank you!

    I was also hoping these values could change when filtering my table as opposed to counting all unique results in my table unfiltered. Is this possible?

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Count unique values across multiple columns

    To keep thing simple, (and efficient-ish), add a binary column to your table to indicate visible status, e.g

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    then, modify your unique calcs to include this column when filtering, e.g

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-11-2021
    Location
    Colchester, England
    MS-Off Ver
    Office 365
    Posts
    27

    Re: Count unique values across multiple columns

    This is awesome. Thank you very much!!

    All solved

+ 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. Count unique values from multiple columns with criteria
    By starter66 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-01-2019, 03:36 AM
  2. Replies: 11
    Last Post: 11-16-2017, 07:11 AM
  3. [SOLVED] Count Unique Values with Duplicates in Multiple Columns
    By sTeezZy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-26-2016, 05:50 PM
  4. Count unique values across 2 columns with multiple criteria
    By Skywalker01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2012, 08:04 AM
  5. Replies: 16
    Last Post: 01-11-2012, 10:51 AM
  6. Replies: 11
    Last Post: 06-09-2011, 03:17 PM
  7. Replies: 5
    Last Post: 04-21-2011, 05:22 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