Forum Discussion
PowerB1Rookie
3 years agoNew 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?
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"))returnpaid+rent+voidNo = 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"))returnpaid+rent+voidScreenshot:If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
thanks,
1 Reply
- Shreeram04
Resolver III
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"))returnpaid+rent+voidNo = 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"))returnpaid+rent+voidScreenshot:If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
thanks,