1

I have a query:

SELECT FD.PatternValue, FD.Service_ID, FD.PatternStartDate, Count(FD.PatternValue) AS CountOfPatternValue
FROM FWPD AS FD INNER JOIN ME ON FD.ID = ME.ID
WHERE (((FD.PatternStartDate) Between #5/1/2015# And #5/5/2015#) AND ((ME.WorkGroup)="ATSA"))
GROUP BY FD.PatternValue, FD.Service_ID, FD.PatternStartDate;

I want to make it so that it becomes a two column header crosstab query, in Access 2010, so that it can be used as a rowsource for a graph showing two grouping levels on the x-axis.

The date would be the lowest level, then there would be each Service_ID above that and then a count of of each pattern value in each service.

I am learning SQL and needed help with how to to get this query done. I believe it requires union all between two crosstabs, but do not know how to do this.

What i am trying to achieve is this:

barplot x-axis labels with hierarchical grouping variables in separate rows

but in Access 2010 on a graph

Thanks in advance

Community
  • 1
  • 1
skizzly
  • 11
  • 3

0 Answers0