Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Kalachuchi
Helper III
Helper III

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

1 ACCEPTED SOLUTION
lkalawski
Resident Rockstar
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! 😀

View solution in original post

6 REPLIES 6
v-easonf-msft
Community Support
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

amitchandak
Super User
Super User

@Kalachuchi , Try like

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
TomMartens
Super User
Super User

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

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Greg_Deckler
Super User
Super User

@Kalachuchi - Try - 

Measure = COUNTROWS(DISTINCT(FILTER('Table1','Table1'[Status]="Completed")))

or

Measure = COUNTROWS(SUMMARIZE(FILTER('Table1','Table1'[Status]="Completed"),[EID]))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
mohammedadnant
Impactful Individual
Impactful Individual

@Kalachuchi 

 

This will help,

 

Completed Count = CALCULATE( DISTINCTCOUNT(CompleteTable[EID]),
FILTER('CompleteTable','CompleteTable'[Status]="Completed"))
 
Thanks and hit the like button,
Mohammed Adnan
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!

Thanks & Regards,
Mohammed Adnan
Learn Power BI: https://www.youtube.com/c/taik18
lkalawski
Resident Rockstar
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! 😀

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.