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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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