Forum Discussion
Cmuglioni
4 years agoFrequent Visitor
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...
- 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.
AlexisOlson
4 years agoSuper User
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.