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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors