I am trying to create aggregated data based on a time dimension as follows:
Example of data:
DateTime,FlowID,Volume
t0,1,100
t1,2,200
t2,3,300
t2,4,400
t2,5,100
t3,4,100
When I visualize sum(Volume) over the DateTime dimension, Tableau correctly shows the total volume for time t2 as the sum of all the records at time t2 (300+400+100).
I am also trying to get a view that shows a table based on hours of the day as follows:
DateTime
0 1 2 ... 23
-----------------------------------------------------
Sum Volume x y z ... t
Max Volume a b c ... d
I want Max Volume to be the sort of "local maximum " during the hour (in this case the sum of all volume records across all the FlowID instances that occurred within the same DateTime t2).
I have looked into the running_max function as follows:
running_max(sum([Volume]),-2,0), but that only gives me the last two records at time t2.
I don't know a-priori how many records end up being at exactly the same time, so I can't use -2 or -3 deterministically.
Any ideas?