Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count a Boolean column based on another column Value

 

I'm trying to create a count of the Article Shared column based on what's in the Case Status column.

I need to know how many Closed cases have a True in the Article Shared column. Is this something I can do?

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Try this, 

     

    Closed Cases = 
        COUNTROWS(
            FILTER(
                Sample_Data, 
                Sample_Data[Case Status] = "Closed"
                && 
                Sample_Data[Article Share] = TRUE()
            )
        )

     

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Try this, 

     

    Closed Cases = 
        COUNTROWS(
            FILTER(
                Sample_Data, 
                Sample_Data[Case Status] = "Closed"
                && 
                Sample_Data[Article Share] = TRUE()
            )
        )

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Perfect. Thank you so much for your help

       

  • EricVieira's avatar
    EricVieira
    Regular Visitor
    Closed Cases with Articles Shared = CALCULATE( COUNT('CaseTable'[Article Shared]), 'CaseTable'[Case Status] = "Closed", 'CaseTable'[Article Shared] = TRUE() )

    This measure calculates the count of 'Article Shared' column where the 'Case Status' is "Closed" and 'Article Shared' is True. You can then use this measure to display the result in a visual or table.