I want to make a simple view using the Charts module.

The x-axis will be a custom field of type Date that I want to show in Y-m-d format and grouped by the same date. The y-axis will be NID with COUNT aggregation.

This seems so easy but the problem is the aggregation of the date field. Apparently, views doesn't like to aggregate those kind of fields. Tried Views Date Format SQL but this only works for core date fields (Posted Date, Updated date...)

So, is there any other way to do this?


Within the Charts module, there is an interesting issue about this, i.e. Graph node input over time (support date formatting on a continuous axis).

In Comment #3 of that issue is stated: 'The trouble here is that neither Views nor Date modules provide aggregation options for date-based fields.'. The patch(es) included in this issue are expected to soon be applied.

  • That means it's not possible? So annoying! – zephirus Dec 12 '15 at 13:08
  • OK, thank you for that clarification. With that consider that part "closed" (which is also why I just removed my comment about that, to indicate also "good enough, let's move on and not worry about it (anymore)", OK? Also, I plan to soon (whenever I have some time) work on an enhanced version of my answer here. If it'd take too long, feel free to "ping" me here about a possible status update, OK? – Pierre.Vriens Dec 12 '15 at 23:12
  • Ok. Will try to solve this in any other way. – zephirus Dec 12 '15 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.