Forum Discussion

Kalachuchi's avatar
Kalachuchi
Helper III
6 years ago
Solved

Working with Count,summarize and filter

So I have a column EID and status,

 

I only want to filter the completed and summarize it based on EID and after will count the rows.
I got lost here don't know where would I put the summarize function

COUNTX(FILTER('Table1','Table1'[Status]="Completed"),'Table1'[Status])
EIDStatus
1

Pending

2Completed
2Completed
3Completed

 

Output: Completed = 2

  • Hello @Kalachuchi

    You can use this measure to get different EID values:

    Cnt of Completed = CALCULATE(DISTINCTCOUNT('Table'[EID]),FILTER('Table','Table'[Status] = "Completed"))



    _______________
    If I helped, please accept the solution and give congratulations! 😀

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Kalachuchi - Try - 

    Measure = COUNTROWS(DISTINCT(FILTER('Table1','Table1'[Status]="Completed")))
    
    or
    
    Measure = COUNTROWS(SUMMARIZE(FILTER('Table1','Table1'[Status]="Completed"),[EID]))
    
  • lkalawski's avatar
    lkalawski
    Resident Rockstar

    Hello @Kalachuchi

    You can use this measure to get different EID values:

    Cnt of Completed = CALCULATE(DISTINCTCOUNT('Table'[EID]),FILTER('Table','Table'[Status] = "Completed"))



    _______________
    If I helped, please accept the solution and give congratulations! 😀

  • Hey Kalachuchi ,

     

    wondering if this more simpler measure is sufficient:

    Measure = 
    CALCULATE(
        DISTINCTCOUNT('Table'[EID])
        , 'Table'[Status] = "Completed"
    )

    Hopefully, this provides what you are looking for.

     

    Regards,

    Tom

     

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi , Kalachuchi 

    amitchandak â€˜s formula needs to be slightly adjusted.

    Measure = COUNTX(summarize(FILTER('Table1','Table1'[Status]="Completed"),'Table1'[EID]),[EID])

     

    If your problem has been solved,please mark the helpful replies or add your reply as Answered to close this thread.
    It will help other community members easily find the solution when they get the similar issue.

     

    Best Regards,
    Community Support Team _ Eason