Hi
I am trying to run a cross tab parameter query for date range, to produce a table below;
--------Deceased----Moving----service----etc (Closed reasons)
Branch
abc------Totals---
def
ghi
My current sql statement appears as below, the problem I have is it will not seperate the totals for each month, it asks me for a date range but just gives me overall totals;
PARAMETERS [start] DateTime, [end] DateTime;
TRANSFORM Count([Closed accounts].[Date Closed]) AS [CountOfDate Closed]
SELECT [Closed accounts].Branch, Count([Closed accounts].[Date Closed]) AS [Total Of Date Closed]
FROM [Closed accounts]
GROUP BY [Closed accounts].Branch
PIVOT [Closed accounts].[Primary reason for account closure];
I am trying to run a cross tab parameter query for date range, to produce a table below;
--------Deceased----Moving----service----etc (Closed reasons)
Branch
abc------Totals---
def
ghi
My current sql statement appears as below, the problem I have is it will not seperate the totals for each month, it asks me for a date range but just gives me overall totals;
PARAMETERS [start] DateTime, [end] DateTime;
TRANSFORM Count([Closed accounts].[Date Closed]) AS [CountOfDate Closed]
SELECT [Closed accounts].Branch, Count([Closed accounts].[Date Closed]) AS [Total Of Date Closed]
FROM [Closed accounts]
GROUP BY [Closed accounts].Branch
PIVOT [Closed accounts].[Primary reason for account closure];