Forum Discussion

Cmuglioni's avatar
Cmuglioni
Frequent Visitor
4 years ago
Solved

Problem with COUNTROWS and TOTALS

Hi Everyone, I have the following issue:   My objective: I have 3 different weather stations that give me the temperature hourly. I am looking to count each hour when the temperature is going below...
  • AlexisOlson's avatar
    4 years ago

    You need to count at the appropriate granularity.

     

    If your date table is at the day-hour granularity, then you can probably write something like this:

    COUNTROWS (
        FILTER ( dimDate, CALCULATE ( MIN ( 'BD Estación meteo'[T° Min] ) ) < 0 )
    )

     

    If your dates and hours aren't both from the same date table (where hour is the deepest level of granularity), then this will need to be adjusted accordingly.