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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculating A Basic Count when criteria is met for 2 columns of data

I have measures to calculate based on a column's data of Yes or No.  I have a total count of a letter that is sent out, and based on the actions responded by the employee they are captured in 3 columns of data - value1, value2, value3 and each are set to Yes or No values.  Example if Value 1 mean letter recieve, Value 2 Means letter response received, and Value 3 employee reports the letter

My calculation for individual columns for yes is :  V1_YesCount = Calculate([TotalLettersSent],LetterTable[Value1] = "Yes)

 

I now want to only have a total count (# of employees) that said Yes for Value1 and Yes for Value 3.

spoaharty_0-1596835883129.png

 

1 ACCEPTED SOLUTION
simrantuli
Continued Contributor
Continued Contributor

Hi @Anonymous,

 

Try the below measure.

V1_YesCount = Calculate([TotalLettersSent],Filter('LetterTable', LetterTable[Value1] = "Yes" && LetterTable[Value3] = "Yes"))

 

Best Regards

Simran Tuli

 

 

View solution in original post

3 REPLIES 3
simrantuli
Continued Contributor
Continued Contributor

Hi @Anonymous,

 

Try the below measure.

V1_YesCount = Calculate([TotalLettersSent],Filter('LetterTable', LetterTable[Value1] = "Yes" && LetterTable[Value3] = "Yes"))

 

Best Regards

Simran Tuli

 

 

Anonymous
Not applicable

Thank you, that was perfect!!

mahoneypat
Microsoft Employee
Microsoft Employee

Please try this expression

 

V1V3_YesCount = Calculate([TotalLettersSent],LetterTable[Value1] = "Yes" && LetterTable[Value3] = "Yes")

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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