07 Nov 2025
08:55 AM
- last edited on
17 Nov 2025
10:08 AM
by
MaciejNeumann
SPL:
|chart values(Total) as Total by date_hour,TimeDiffFinal
DQL
| makeTimeseries Total=collectDistinct(Total), by:{date_hour, TimeDiffFinal}, time:LatestTime
So, basically i have converted values into collectDistinct in dynatrace.
Getting ERROR -The parameter has to be an expression-based timeseries aggregation.
07 Nov 2025 02:34 PM
Hi,
I think, that the error happens because makeTimeseries requires a numeric aggregation (e.g., countDistinct, sum, avg, last), while collectDistinct() returns a list, which can’t form a timeseries.
You can try with this:
fetch logs, scanLimitGBytes: -1
| summarize Total_list = collectDistinct(Total),
by: { date_hour = bin(timestamp, 1h), TimeDiffFinal }
| sort date_hour asc, TimeDiffFinal ascYou should recive table and list of values