Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Eliminate the overlapping data

Hello, I want to show the count of new clients and existing clients (by using cards) and filtered by month (using slicer), and here is an example of the issue.   Sample data: Date Client Clie...
  • vivran22's avatar
    vivran22
    6 years ago

    @jmah

    Try this:

     
    Existing Clients =
    var _existing = CALCULATETABLE(DISTINCT('Client List'[Client]), 'Client List'[Client Type (Calculated Column)] = "Existing Client")
    var _new = CALCULATETABLE(DISTINCT('Client List'[Client]), 'Client List'[Client Type (Calculated Column)] = "New Client")
    return COUNTROWS(EXCEPT(_existing, _new))
     
    New Clients =
    CALCULATE(
      DISTINCTCOUNT('Client List'[Client]),
      'Client List'[Client Type (Calculated Column)] = "New Client"
    )

    Bless you!
    Vivek

    Blog: vivran.in/my-blog
    Connect on LinkedIn
    Follow on Twitter