Forum Discussion

benalfassy's avatar
benalfassy
Regular Visitor
8 years ago
Solved

Help with Filter + Distinct

Hi,   I have table with columns "status","ID"   I need to count the rows that have "Active" status but with distinct ID and then put it into a new measure.   How can i filter my table on "Activ...
  • v-caliao-msft's avatar
    v-caliao-msft
    8 years ago

    benalfassy,

     

    Please use the DAX below.

    Measure 2 = CALCULATE(DISTINCTCOUNT(Table1[ID]),FILTER(Table1,Table1[Status]="Active"))

     

    Regards,

    Charlie Liao

  • Ashish_Mathur's avatar
    Ashish_Mathur
    8 years ago

    Hi,

     

    Try this

     

    =CALCULATE(DISTINCTCOUNT(Data[ID]),Data[Status]="Active")

     

    Hope this helps.