CrossTab-Columns Calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all
Say I have this Crosstab query

Model Manufactured Reject Transferred
AB.1 5 1
OM.1 10 0
OM.3 10 2

What I'd like to do is to create the one more column which is the calculation of the last 3 columns (Manufactured - Reject - Transferred = Stock). Any ideas how to do this

TIA
Djoezz
 
HI,


Have you tried to use the crosstab as source in another query:

SELECT *, Manufactured - Reject - Transferred As Stock
FROM myCrosstab



Hoping it may help,
Vanderghast, Access MVP



Djoezz said:
Hi all,
Say I have this Crosstab query:

Model Manufactured Reject Transferred
AB.1 5 1 1
OM.1 10 0 5
OM.3 10 2 5

What I'd like to do is to create the one more column which is the
calculation of the last 3 columns (Manufactured - Reject - Transferred =
Stock). Any ideas how to do this?
 
It would have helped if you had provided the SQL of your crosstab since we
don't know the name of your column heading field or how the value is
calculated. Assuming a field [Status] and value = Sum([Qty]) you could try
create another Row Heading column in your crosstab:
Stock:Sum([Qty] * Abs([Status]="Manufactured")) + Sum([Qty] *
([Status]="Reject" OR [Status]="Transferred"))

--
Duane Hookom
MS Access MVP
--

Djoezz said:
Hi all,
Say I have this Crosstab query:

Model Manufactured Reject Transferred
AB.1 5 1 1
OM.1 10 0 5
OM.3 10 2 5

What I'd like to do is to create the one more column which is the
calculation of the last 3 columns (Manufactured - Reject - Transferred =
Stock). Any ideas how to do this?
 
Thanks for all who responded to my posting
The problem is now solved, I tried to do what Michel is suggested which is to create another query that use the crosstab as reference

Thanks again..
-Djoezz
 
Back
Top