3rd time a charm?

K

Keith

3rd time a charm? I have a crosstab Q that we use for our
sales force that tells use the category of the sale and
who made the sale. All of the sales fall into the
following categories:

So the crosstab Q looks like this
Sales Cat header
Rep Name Last4 Total GMA GFA SMA SFA CMA CFA
Smith 1234 4 1 1 1 1
Jones 6598 1 1
White 5987 3 1 1 1

I would like the blank sales Cat GFA for Smith to have
a "0" in it. And the same for all of the other blanks.

I have had some feed back on this. Use NZ (Null-to-Zero)
but I don't know where to put the code in the crosstab Q.

Here is the crosstab in SQL.


TRANSFORM Count([DTPInGrossNumbersFYLookUp Q].DEPInDate)
AS [The Value]
SELECT [DTPInGrossNumbersFYLookUp Q].RC,
[DTPInGrossNumbersFYLookUp Q].[RCTR Last 4], Count
([DTPInGrossNumbersFYLookUp Q].DEPInDate) AS [Total Of
DEPInDate]
FROM [DTPInGrossNumbersFYLookUp Q]
WHERE ((([DTPInGrossNumbersFYLookUp Q].MissionCAT)="GMA"
Or ([DTPInGrossNumbersFYLookUp Q].MissionCAT)="GFA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="SMA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="SFA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="CMA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="CFA"))
GROUP BY [DTPInGrossNumbersFYLookUp Q].RC,
[DTPInGrossNumbersFYLookUp Q].[RCTR Last 4]
PIVOT [DTPInGrossNumbersFYLookUp Q].MissionCAT In
("GMA","GFA","SMA","SFA","CMA","CFA");
 
K

keith

Yes. I do not know what you mean by creating the value?
the code you gave me was TheVal:Val( Nz( Sim([Qty]),0) ).

Sorry that I keep woking this.

Thanks Duane!!!!
-----Original Message-----
Did you check my response to your previous question?

--
Duane Hookom
MS Access MVP


Keith said:
3rd time a charm? I have a crosstab Q that we use for our
sales force that tells use the category of the sale and
who made the sale. All of the sales fall into the
following categories:

So the crosstab Q looks like this
Sales Cat header
Rep Name Last4 Total GMA GFA SMA SFA CMA CFA
Smith 1234 4 1 1 1 1
Jones 6598 1 1
White 5987 3 1 1 1

I would like the blank sales Cat GFA for Smith to have
a "0" in it. And the same for all of the other blanks.

I have had some feed back on this. Use NZ (Null-to- Zero)
but I don't know where to put the code in the crosstab Q.

Here is the crosstab in SQL.


TRANSFORM Count([DTPInGrossNumbersFYLookUp Q].DEPInDate)
AS [The Value]
SELECT [DTPInGrossNumbersFYLookUp Q].RC,
[DTPInGrossNumbersFYLookUp Q].[RCTR Last 4], Count
([DTPInGrossNumbersFYLookUp Q].DEPInDate) AS [Total Of
DEPInDate]
FROM [DTPInGrossNumbersFYLookUp Q]
WHERE ((([DTPInGrossNumbersFYLookUp Q].MissionCAT) ="GMA"
Or ([DTPInGrossNumbersFYLookUp Q].MissionCAT)="GFA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="SMA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="SFA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="CMA" Or
([DTPInGrossNumbersFYLookUp Q].MissionCAT)="CFA"))
GROUP BY [DTPInGrossNumbersFYLookUp Q].RC,
[DTPInGrossNumbersFYLookUp Q].[RCTR Last 4]
PIVOT [DTPInGrossNumbersFYLookUp Q].MissionCAT In
("GMA","GFA","SMA","SFA","CMA","CFA");


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top