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
PowerB1Rookie
New Member

How would I calculate column values for each row?

Hi, 

 

I have a table with multiple comparison columns like below:


Person   Rent    Paid    Void 

1            Yes      No      No 

2            No      No      No

3            Yes      Yes      Yes

 

the table I have is a lot bigger and has about 20 columns with various yes/no fields in each. 

How would I calculate how many yes/no's there are for each person/row?

 

1 ACCEPTED SOLUTION
Shreeram04
Resolver III
Resolver III

Hi @PowerB1Rookie 

 

Please find the below screenshot for your reference.

 

Measure:

yes = var paid= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Paid]="Yes"))
var rent=CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Rent]="Yes"))
var void= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Void]="Yes"))
return
paid+rent+void
 
No = var paid= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Paid]="No"))
var rent=CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Rent]="No"))
var void= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Void]="No"))
return
paid+rent+void
 
Screenshot:
Shreeram04_0-1665071629590.png

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

thanks,

View solution in original post

1 REPLY 1
Shreeram04
Resolver III
Resolver III

Hi @PowerB1Rookie 

 

Please find the below screenshot for your reference.

 

Measure:

yes = var paid= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Paid]="Yes"))
var rent=CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Rent]="Yes"))
var void= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Void]="Yes"))
return
paid+rent+void
 
No = var paid= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Paid]="No"))
var rent=CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Rent]="No"))
var void= CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),'Table'[Void]="No"))
return
paid+rent+void
 
Screenshot:
Shreeram04_0-1665071629590.png

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

thanks,

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors