+ Reply to Thread
Results 1 to 2 of 2

Group By driver id number "document a" values which are not "N/A"

  1. #1
    Registered User
    Join Date
    01-08-2021
    Location
    Spain
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    12

    Post Group By driver id number "document a" values which are not "N/A"

    Good morning,

    I'm doing a power pivot with data of a datatable of drivers, columns are "company, department, driver id number, and document A".

    What I'm trying to achieve is to create a measure grouping by idNumber (cause same driver can be in different departments), and count how many of them have anything on that "document A" column but "N/A" (accepted, rejected etc).

    =COUNTX (
    ADDCOLUMNS (
    DISTINCT ( SummaryData_DataTable2[Driver ID Number]);
    "CountPerDriver"; CALCULATE ( DISTINCTCOUNT ( SummaryData_DataTable2[Document A])
    ;FILTER(SummaryData_DataTable2;SummaryData_DataTable2[Document A] <> "N/A") )
    );
    [CountPerDriver]
    )

    What this does is spot if drivers of a company has "N/A" or not in their "document A drivers", but doesn't count how many of them are "N/A" or not, for example, if company has 50 drivers, the result of this formula will be always 50.

    For more detail I create an example in Excel.

    Thank you for your time!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Group By driver id number "document a" values which are not "N/A"

    This proposal adds a column (Drivers Not N/A) to the data model.
    The added column is populated using: =IF(Table1[document a]="N/A","",Table1[driver id number])
    The measure No Drivers Not N/A is then populated using: =CALCULATE(DISTINCTCOUNT([Drivers Not N/A]),Table1[Drivers Not N/A]<>"")
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Brief formula to convert time values to "shift1", "shift2", "shift3".
    By darekpawel in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-11-2019, 07:05 AM
  2. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  3. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. Replies: 0
    Last Post: 01-09-2013, 06:52 PM
  6. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  7. Replies: 3
    Last Post: 02-16-2011, 02:55 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