+ Reply to Thread
Results 1 to 5 of 5

How can I count the distinct values

  1. #1
    Registered User
    Join Date
    04-12-2017
    Location
    Oregon, USA
    MS-Off Ver
    2016
    Posts
    2

    How can I count the distinct values

    I have created a new calculated column in the data model that is a combination of 5 columns.

    I need to some how count the number of times there 2 or greater matches in this column. If 2 or 10 rows of data match I need it to count it as 1. If only 1 row is unique it would be a 0

    Need this to be done using a Dax function since I will be using this data in a pivot table.

    I went ahead an uploaded a sample with data and what I'm looking for.

    Thanks!
    Attached Files Attached Files
    Last edited by rizz0; 04-12-2017 at 04:21 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: How can I count the distinct values

    Your explanation is far from clear. You refer to 5 columns, yet there are only 4. There is no indication of what your expected result (manually calculated) should be. Please have another go....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: How can I count the distinct values

    In "G" column add "Helper" with In Cell "G3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In cell "H3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: How can I count the distinct values

    in G3, then drag down
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-12-2017
    Location
    Oregon, USA
    MS-Off Ver
    2016
    Posts
    2

    Re: How can I count the distinct values

    Glenn Thanks for taking the time to look at my issue.

    As for there only being 4 columns compared to my 5 I stated I was using. I didn't think that was a huge deal in my sample. As long as 4 or 10 columns when joined together with &" - "& in the calculated column match that is what I need. There was also notes in the data model of what I was looking for. I can't do this in the main excel window it needs to be done in PowerPivot. Of those 7 rows of data there are 3 distinct rows. Of those 3 distinct, row 7 doesn't have multiple rows that match so I don't want that counted. I tried to attach a screen shot below. Hopefully when I post this it will appear.


    DistinctCount.JPG

+ 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 of Values (Rows) of Most Recent Consecutive Streak (2+ Distinct Values)
    By ExcelForum88 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2016, 12:26 PM
  2. How to Count Distinct Values in Excel
    By kisanvikas2015 in forum Excel General
    Replies: 2
    Last Post: 05-19-2015, 10:12 AM
  3. Count Distinct Values
    By trevordsmith in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-02-2014, 09:21 PM
  4. [SOLVED] Count Conditional Distinct Values
    By Gos-C in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-10-2013, 05:41 AM
  5. [SOLVED] Count Distinct Values
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-20-2012, 07:39 AM
  6. count two columns for distinct values
    By warrencameron in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-18-2011, 09:09 AM
  7. Count Distinct Values?
    By bill_morgan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-26-2005, 10:06 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