Forum Discussion

Brahms99's avatar
Brahms99
Frequent Visitor
9 months ago
Solved

Formula to count values in two separate columns

Hello,    I am new to power bi. I am looking for a formula that would return the count of “Yes” in columns “Timesheet Submitted 1” and “Timesheet Submitted 2” combined.  So, the result would would ...
  • MasonMA's avatar
    9 months ago

    Hi, 

    If it is to work in any evaluation context, try this Measure. 

    Count =
    SUMX(
        'Table',
        IF('Table'[Timesheet Submitted 1] = "Yes", 1, 0) +
        IF('Table'[Timesheet Submitted 2] = "Yes", 1, 0)
    )