Results 1 to 4 of 4

Thread: Distinct Count based on given criteria
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Feb 2012
    Location
    IN
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Distinct Count based on given criteria

    Hello,

    I am looking some help in getting distinct count by criteria. For example if you refer the below table I brought the distrinct count by using formala {=Sum(1/Countif(A:A,A2))} however, in additon to this need another conditional criteria. If given % different for no then it should consider as 1 count and if more than 1 then it should go for 1/count.

    I have mentioned the final require results. can anyone will help on this requirement.


    No % Distinct Count Final Results
    1111 60 0.50 1.00
    2222 40 0.50 1.00
    1111 50 0.50 1.00
    3333 10 1.00 1.00
    4444 50 1.00 1.00
    2222 60 0.50 1.00
    5555 50 0.50 0.50
    5555 50 0.50 0.50
    6666 10 0.33 1.00
    6666 60 0.33 1.00
    6666 50 0.33 1.00
    Cheers,
    -------------------------------------------------
    I'm Using -
    OS - Windows 8 & 10
    MS Office - Excel - 2013/16


    "The only way to do great work is to love what you do" - Steve Jobs

  2. #2
    Board Regular
    Join Date
    Jul 2014
    Location
    Memphis, TN
    Posts
    2,681
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Distinct Count based on given criteria

    Why SUM?
    Use COUNTIFS instead of COUNTIF
    Last edited by SpillerBD; Sep 26th, 2019 at 03:41 PM.
    Excel 2013, 2016 with PowerBI
    Knowing that it can be done is half the battle!

  3. #3
    Board Regular
    Join Date
    Feb 2012
    Location
    IN
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Distinct Count based on given criteria

    Quote Originally Posted by SpillerBD View Post
    Why SUM?
    Use COUNTIFS instead of COUNTIF
    If I don't use Sum fucntion how do I get the unique number count ? If you see third column in the given table how to get that.
    Cheers,
    -------------------------------------------------
    I'm Using -
    OS - Windows 8 & 10
    MS Office - Excel - 2013/16


    "The only way to do great work is to love what you do" - Steve Jobs

  4. #4
    Board Regular
    Join Date
    Jul 2014
    Location
    Memphis, TN
    Posts
    2,681
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Distinct Count based on given criteria

    Your Counting the uniques. And then SUMing the uniques. That seems redundant. But the redundancy doesn't show itself because the ARRAY part is evaluated before the SUM function is evoked, so it is only SUMing one value.
    Excel 2013, 2016 with PowerBI
    Knowing that it can be done is half the battle!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •