cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Display data in calendar weeks

stefan_eggersto
Dynatrace Mentor
Dynatrace Mentor
How can I aggregate my data into calendar weeks? This is a simplified version of my query:
fetch events
| summarize count(), by:{bin(timestamp, 7d)}
This chart shows the beginning of the weeks in the legend, but I'd like to display calendar weeks:
stefan_eggersto_0-1685541291634.png

 

 
1 REPLY 1

educampver
Dynatrace Helper
Dynatrace Helper

Hi Stefan, you can achieve this with the formatTimestamp function, like so:

 

fetch events
| fieldsAdd week = formatTimestamp(timestamp, format: "w yyyy")
| summarize count(), by:{week}

 

 

Featured Posts