Forum Discussion
How to Aggregate Temperature Column Per Hour Per Day
- Anonymous2 years ago
Hi, Ibrahim_shaik
May I ask if you have already solved this problem? On top of the DAX you wrote, just add an ALL.Measure:
Expected = VAR CurrentDate = MAX('AmbTemp'[date]) VAR CurrentHour = HOUR(MAX('AmbTemp'[time])) RETURN CALCULATE( AVERAGE('AmbTemp'[t_out]), FILTER( ALL('AmbTemp'), SELECTEDVALUE('AmbTemp'[date]) = CurrentDate && HOUR('AmbTemp'[time]) = CurrentHour ) )Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, Ibrahim_shaik
May I ask if you have already solved this problem? On top of the DAX you wrote, just add an ALL.
Measure:
Expected =
VAR CurrentDate = MAX('AmbTemp'[date])
VAR CurrentHour = HOUR(MAX('AmbTemp'[time]))
RETURN
CALCULATE(
AVERAGE('AmbTemp'[t_out]),
FILTER(
ALL('AmbTemp'),
SELECTEDVALUE('AmbTemp'[date]) = CurrentDate &&
HOUR('AmbTemp'[time]) = CurrentHour
)
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum