Hello,

We want to create a visualizations in which we can compare the average prices per week for different years. Normally we would just get the mean prices per week. But, the problem in our case is that each document has a different count/amount of products. So to get the actual average price of all the documents per week, a weight based on the amount of products should be added to the average price of each document.

To 'simplify' this, we came up with the approach of dividing the sum of the turnover of all the docs by the sum of the amount of products of these docs to get the average price per week (per auction place/grading condition). In a TSVB this is possible by adding this in a bucket script, but as far as I know, not in a standard line chart. We would really appreciate it to visually compare week prices (per auction place/grading condition) for different years, which is however not possible in a TSVB (only time on x-axis instead of week numbers).

So, do you have suggestions on how to add this in a line chart. Could this be done in the 'advanced JSON input' or is it possible to create this in a scripted field? Thanks in advance!