Forum Discussion

Daniel_B's avatar
Daniel_B
Icon for Helper II rankHelper II
6 years ago
Solved

COUNTIF multiple column criteria selections

Hi All   Another simple one I'm hoping to get some help with to boost my learning (YouTube is a minefield!!)   I have 2 columns - Sentiment (contains various sentiment values) & Theme (contains t...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi, Daniel_B 


    If I understand you correctly, you want to divide the number of times a Person is considered Positive by the total number of rows in one formula. In this case , try the following DAX:

     

    Result =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( 'Table', [Sentiment] = "Positive" && 'Table'[Theme] = "Person" )
    )
        / 
            COUNTROWS ( 'Table' )
     

     

    Please leave a message for any updates. 

    Best,
    Paul

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.