Forum Discussion

LauraCawdronDav's avatar
3 years ago
Solved

Counting true and false across columns

Hiya,   I want to make a new column which calculates the number of 'trues' for each opportunity across a number of other columns.   The example data is below, but for some context 'service' field...
  • Greg_Deckler's avatar
    3 years ago

    LauraCawdronDav You could do this:

    Measure =
      COUNTROWS(
        FILTER(
          UNION(
            SELECTCOLUMNS('Table',"Service",[Service_A]),
            SELECTCOLUMNS('Table',"Service",[Service_B]),
            SELECTCOLUMNS('Table',"Service",[Service_C])
          ),
         [Service] = TRUE()
       )
     )