Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

count

Hi, I would like to get the count of rows for column A when column B, which is year is 2019

i.e.

countofrows =
CALCULATE(
COUNTROWS('table1')
, 'table2'[Year] = 2019
)
 
What is wrong with this please?

1 Reply

  • HotChilli's avatar
    HotChilli
    Community Champion

    Do you have 1 table or 2 tables?

    If you have 1, the count won't work because you are referring to 2 tables.

    If you have 2 tables, you need a relationship set up correctly between them.