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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Column that counts the number of values ​​for the same ID

I'm trying to create a column that counts the number of rows for each ID where the column "Proof" is blank. 


Each person has a unique ID and they can have different courses linked to them. The "Proof" column informs whether the person has proof of that course was completed or not. If it's blank, it means the person doesn't have proof yet.
I want to create a column that shows the number of rows where the "Proof" column is blank for the same ID.

My table follows this structure:

ID   Person Name     Course  Proof
1   Jack   Social Study  Yes
1   Jack   IT 
2   Rose   IT  Yes
3   Sindra   Advanced Math  Yes
3   Sindra   Digital Pilot 
3   Sindra   Team Management 


The expected result with this new column would be this:

ID  Person Name  Course  Proof    Count
1JackSocial Study    Yes    1
1JackIT     1
2RoseIT    Yes    0
3SindraAdvanced Math    Yes    2
3SindraDigital Pilot     2
3SindraTeam Management     2

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Count = calculate(countrows(Data),filter(Data,Data[ID]=earlier(Data[ID])&&Data[proof]=blank()))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
vicky_
Super User
Super User

vicky__0-1689030977581.png

Here's a measure that you could use:

Count = CALCULATE(COUNTROWS('Table (2)'), 'Table (2)'[Proof] = "", ALLEXCEPT('Table (2)', 'Table (2)'[ID  ])) + 0

Hope it helps.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors