Forum Discussion
juju
Helper III
9 years agoCalcualting Max hourly value
I am looking to create a measure to calculate the max hourly value, for each hour over a 24 hour period, across several days.
This is summing up the hourly values instead of giving me the max.
Max Hourly Value =
MAXX (
SUMMARIZE (
dimtime,
dimtime[StartOfHour]
),
SUM('table2'[value])
)Table2 is the main fact table with a datetime column which is related to the dimtable .
5 Replies
- Phil_Seamark
Microsoft Employee
- juju
Helper III
- Phil_Seamark
Microsoft Employee
Hi juju
I'm not sure you need an hour. I just draged your 'StartOfHour' column to a table (formatted the time) and then just dragged your 'Value' field as well, but used the menu to use the MAX calucation to show the best value
While this is a simple approach, I suspect you'll run into issues when you expand this to your real data.
Have you considered a calculated table?
Table = SUMMARIZE( 'table2', dimtime[StartOfHour] , "Max Value" , MAX('table2'[value]) , "Min Value" , MIN('table2'[value]) , "Median Value" , MEDIAN('table2'[value]) -- ETC ETC )