Hi vovagalchenko,
Thanks for sending this our way. Let me address each of these separately.
-"Is my understanding of Summarize By as described above correct?"
A: It absolutely is correct. The amount of data values being bucketed together will typically increase along when chart time windows are increased. When the returned data stays static and the "Summarize By" option is set to "Max", you shouldn't expect to see a lower max value in larger time windows vs smaller time windows.
-"Is Summarize By applied at the end of all time series transformations?"
A: Again, you are absolutely correct. For something like mcount(30m, sum(ts(my.metric))), we would execute the entire query (along with the function transformations) first before the "Summarize By" is applied.
-"How can it be that with Summarize By being set to 'Max', I'm seeing lower values when I'm zoomed out, than when I'm zoomed in?"
A: This is the tricky question that I will need some time to answer. The query you are looking at seems to be highly nested and using several functions. My initial hypothesis is that it has something to do with the combination of integral() and if(), but I can't confirm that for certain just yet. This hypothesis is based on the fact that if() is a conditional statement and results from integral() are based on the selected chart time window. So as time windows increase, it could change what if() considers to be true, and integral() results would change as well which could impact the final results for ${basic_downs_min}.
Please allow us some time to fully investigate this nested query and we'll get back to you with our results. We appreciate your patience!
Thanks,
Jason