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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Brahms99
Regular Visitor

Formula to count values in two separate columns

Hello, 

 

I am new to power bi. I am looking for a formula that would return the count of “Yes” in columns “Timesheet Submitted 1” and “Timesheet Submitted 2” combined.  So, the result would would be 6.

 

Ideally, if I could use a formula without having to pivot the table. 

 

ID

Timesheet Submitted 1

Timesheet Submitted 2

1

Yes

 

2

Yes

Yes

3

 

Yes

4

Yes

Yes

 

 

Thank you

1 ACCEPTED SOLUTION
MasonMA
Community Champion
Community Champion

Hi, 

If it is to work in any evaluation context, try this Measure. 

Count =
SUMX(
    'Table',
    IF('Table'[Timesheet Submitted 1] = "Yes", 1, 0) +
    IF('Table'[Timesheet Submitted 2] = "Yes", 1, 0)
)

 

View solution in original post

1 REPLY 1
MasonMA
Community Champion
Community Champion

Hi, 

If it is to work in any evaluation context, try this Measure. 

Count =
SUMX(
    'Table',
    IF('Table'[Timesheet Submitted 1] = "Yes", 1, 0) +
    IF('Table'[Timesheet Submitted 2] = "Yes", 1, 0)
)

 

Helpful resources

Announcements
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.