Hello, community.
Would You advise me how to plot the line chart with value (Y-axis) aggregated on a weekly basis?
In my case the source data structure is almost as in "Demo GreenCar roadshow - web traffic" data feed:
- Date (date in format DD.MM.YYYY)
- Value (number).
This data is updated weekly. That is why we can not use neither monthly aggregation (too rough) nor daily (too detailed).
Aggregation by week number is not possible in the line chart diagram. And seems there's no possibility to extract week number from date with MashZone tools for data feed definition.
If I use Excel for week data calculation (adding column to source data) then I face the sorting issue: 10th week follows after 1st week on line chart instead of 9th.
Hope I succeeded explaining the situation.
Usually you would utilize the operator "Convert date" to achieve this. It removes precision from dates to assign different minutes to the corresponding hour or different days to their month.
But unfortunately the operator has no "weekly" precision; you already indicated day/month is the best you found. We are aware of it and the next version will introduce an enhancement.
Until now you may do some arithmetic to work around. It consists of
- assigning a sequence of numbers to each day
- doing modulo 7 after wards
- now use "Move date" to shift each day back using the offset calculated in step 2
E.g. starting with a date like May, 31 2010; June, 1 2010; June 2 2010 the first has an modulo 7 offset of zero and won't be shifted. The second is shifted back one day since modulo 7 offset worth 1 and so on. This moves each day of week date back to the week's first day.
You may find this related post interesting.