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
 

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

Similar Threads

Multiple value fields in a crosstab query 2
Crosstab Query Problem 5
string crosstab query 1
Crosstab Query / Column Headers 2
crosstab query question. 3
crosstab query? 12
Crosstab? 4
Crosstab dual columns? 6

Back
Top