Forum Discussion

weilai0521's avatar
weilai0521
Frequent Visitor
7 years ago
Solved

Count columns with 'Yes'

Hi, 

 

I have multiple columns with 'Yes', 'No' or missing (null or '.'). I want to create a Count column that count the number of 'Yes' for each row. 

 

For example, if I have the following data, the count would be 2. 

 

A      B     C     D

Yes  Yes  No   . 

 

Thanks!

  • weilai0521 

     

    As a calculated column, you can use

     

    Column = VAR myrow={[A],[B],[C],[D]}
    RETURN
    COUNTROWS(Filter(myrow,[Value]="Yes"))

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    weilai0521 

     

    As a calculated column, you can use

     

    Column = VAR myrow={[A],[B],[C],[D]}
    RETURN
    COUNTROWS(Filter(myrow,[Value]="Yes"))