Counting elements in Power BI reports equal to a specific value

Let's assume that you have a People table in Power BI:

ASCII
|    Name     |   Age   |    City     |
=======================================
|    Elon     |    52   |   Chicago   |
|    Bill     |    68   |   Seattle   |
|    Chris    |    19   |    Denver   |
|    Mark     |    39   |   Seattle   |
|    Alice    |    40   |   New York  |
=======================================

If you wish to count the elements that are equivalent to a given parameter, then:

DAX
Measure = CALCULATE(
  COUNT(
    Table[Column]), 
    FILTER(Table, Table[Column] = Parameter)
)

For instance, let's assume that you want to get the number of people living in Seattle:

DAX
Measure = CALCULATE(
  COUNT(
    People[City]), 
    FILTER(People, People[City] = "Seattle")
)

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.