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

Count Rows with Multiple Criteria using Date and ID

Hi All,

Wondering if you can help me. I am tasked to produce monthly Staff Attendance reports to make sure staff are coming back into the office after the pandemic. 

I want to create a column that counts the number of rows where they attend each month. 

So my conditions are number of times in a month and their employee reference number. 

I'm trying to use Count and Filter but this is counting total rows in table. In the below example I should have 2 in Count rows (Month) column as this staff member tapped in twice in May.

Jimb0_0-1657702919078.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I managed to fix this issue by creaating an aggregated table and then doing a count on Emp ID and filter on month. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I managed to fix this issue by creaating an aggregated table and then doing a count on Emp ID and filter on month. 

NickolajJessen
Solution Sage
Solution Sage

Firstly, don't do this in a calculated column. Do it in a measure.
Secondly i'm a bit confused about the redacted table names. Are they a secret?

Anonymous
Not applicable

Hi Nickolaj, 

The reason I want to do it in a column is I then want to bring it into a calculated table to then do a further calcultion on days attended each month divided by number of available days.

 

So for me I attended the office 4 times this month and 22 days available in the month so that will be 18% time in office in that month. 

I redacted the table names as it shows the place names of where I work. I'd rather not show you that.

 

Jimb0_0-1657704561758.png

Thanks for your help. I really, really appreciate it. 

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