The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 0.
What i have done: I have succeed to create a measure that count every time when the temperature is below 0 using this formula:
My problem: I have an issue with the totals (last two columns) it should show me 1/1/1 instead of 1/3/2 and the total should be 3.
Any tips or advices?
Thanks in advance!
Solved! Go to Solution.
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.
Hi Alexis, you were right, thank you. I made a crossjoin table between dates and hours and with your formula, it works perfect!
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.