Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

PowerBI CountRows IF Column Contains

I am trying count the number of rows in a table if a column CONTAINS certain text.... I have created a list of the items (13 items) which i need to check against the column to identify it it contains...
  • jdbuchanan71's avatar
    4 years ago

    Anonymous 

    Try it like this.

    Item Count =
    CALCULATE (
        COUNTROWS ( YourTable ),
        'YourTable'[Column1] IN { "egg", "apple", "rice" }
    )