Hi All
I have the below sql, but at present it has calender year as quarter, ie, Jan, Feb, Mar as Q1, what i need is year to start in april, so Q1 would be Apr, May, Jun, etc
SELECT DISTINCTROW StrategyMonthly.Name, Format$(StrategyMonthly.Date,'\Qq yyyy') AS [Date By Quarter], Sum(StrategyMonthly.CostLDE) AS CostLDE, Sum(StrategyMonthly.ValueLDE) AS ValueLDE, Sum(StrategyMonthly.CostAll) AS CostAll, Sum(StrategyMonthly.ValueAll) AS ValueAll, (([valueLDE]-[CostLde])/[Valuelde]) AS GMLDE, (([valueall]-[costall])/[valueall]) AS GMAll, [ValueLDE]/[valueall] AS LDESales, StrategyMonthly.WebSales
FROM StrategyMonthly
GROUP BY StrategyMonthly.Name, Format$(StrategyMonthly.Date,'\Qq yyyy'), (([valueall]-[costall])/[valueall]), [ValueLDE]/[valueall], StrategyMonthly.WebSales, Year(StrategyMonthly.Date)*4+DatePart('q',StrategyMonthly.Date)-1
ORDER BY Format$(StrategyMonthly.Date,'\Qq yyyy');
Is it possible to do this
I have the below sql, but at present it has calender year as quarter, ie, Jan, Feb, Mar as Q1, what i need is year to start in april, so Q1 would be Apr, May, Jun, etc
SELECT DISTINCTROW StrategyMonthly.Name, Format$(StrategyMonthly.Date,'\Qq yyyy') AS [Date By Quarter], Sum(StrategyMonthly.CostLDE) AS CostLDE, Sum(StrategyMonthly.ValueLDE) AS ValueLDE, Sum(StrategyMonthly.CostAll) AS CostAll, Sum(StrategyMonthly.ValueAll) AS ValueAll, (([valueLDE]-[CostLde])/[Valuelde]) AS GMLDE, (([valueall]-[costall])/[valueall]) AS GMAll, [ValueLDE]/[valueall] AS LDESales, StrategyMonthly.WebSales
FROM StrategyMonthly
GROUP BY StrategyMonthly.Name, Format$(StrategyMonthly.Date,'\Qq yyyy'), (([valueall]-[costall])/[valueall]), [ValueLDE]/[valueall], StrategyMonthly.WebSales, Year(StrategyMonthly.Date)*4+DatePart('q',StrategyMonthly.Date)-1
ORDER BY Format$(StrategyMonthly.Date,'\Qq yyyy');
Is it possible to do this