I work in a call center and am trying to generate a crosstab query in MS Access 2016 that will show sales conversion rates by month and by advertising source. In this query I want the columns to represent months, the rows to represent advertising sources and the values to be the sales conversion rate for that advertising source and month.
I tried setting the Total
field to Expression
and get this error: Your query does not include the specified expression Close Rate as part of an aggregate function
. Close Rate
is the field name I've used for the sales conversion rate item I described above.
If I set the Total
field to Group By
I get the below error.
I don't want to sum, count, etc... my value field here though, I simply want to display a value I've specified for the intersection of my specified row and column field. Is this possible?
Here is the SQL code for the crosstab query while I have the Total field for the value set to Expression
.
TRANSFORM [Qry_Closing by Month by Campaign].[Close Rate]
SELECT [Qry_Closing by Month by Campaign].PromoCode
FROM [Qry_Closing by Month by Campaign]
GROUP BY [Qry_Closing by Month by Campaign].PromoCode
PIVOT [Qry_Closing by Month by Campaign].Month;
Here is the SQL for the query below the cross tab query.
SELECT [dd campaign_Five9_Final].Month, [dd campaign_Five9_Final].PromoCode, Format(Round([Total Sales]/[sumofcalls],4),"Percent") AS [Close Rate]
FROM [dd campaign_Five9_Final];
There are additional queries below this that I can post if necessary.
Thanks ahead of time for any help!