Does anyone know how to group a set on rows totals that have a date column and sum them into a weekly total - either w/c or w/e?
3 Replies
-
Hi Charles,
MashZone does not containt calculation functionality for weeks. So in order to get the week for a date, you should use a webservice like this: http://www.onlineconversion.com/day_week_number.htm or - in case your data comes from excel - some functionality from there. Then, you would take the week as a separate column into your feed. You can then aggregate the row data using this 'week' column as reference. Either by using the 'aggregate' operator directly or implicitly by connecting the feed to a data display component in the 'Composer' of MashZone.However: There is a way to calculate the week for dates with limited effort for a single year (e.g. 2011). The following 2 screenshots show how this can be done. I have to admit, that the value for 'WeekdayOf1Jan2011' might not be correct, but you get the idea.
regards
Jürgen
-
-
Hello,
actually this took me by surprise! It seems to work (checked it), but i wasn't aware that the pattern 'w' is interpreted for date conversions.MashZone does not offer 'w' as an available pattern. So you should be aware that this pattern is untested and we cannot guarantee that it works correctly in all circumstances.
We will check for version 2.3 of MashZone to include this pattern officially. Until then you have to use it at your own risk.
Kind regards
Jürgen Kirsch