Sorry, this is a duplicate. Please reply the other one
Part of my Access Database has two fields that I want to work on: [Model] and [Gross]
[Model] has a drop down list with ( "A", "B", "C", etc,) options.
When I use the following expression, (in this case for Model “A”)
Code.
Abs(Sum([Table].[Gross] And ([Table].[Model]="A"))) AS [Total A Gross]
I get the count of the number of records that the Model "A" has, which is 2. Instead, my intension is to get the total Gross amount of it, which is $350.00.
Model……Gross……G ross A
A…………150.00…..… ….1
A……….. 200.00.………..1
B………..375.00.…… ……0
C………..400.00... ……...0
C……..…100.00……… ...0
Total………………………. 2
What would it be the correct expression to get the Total Gross of each Model individual?
Something like this would be the ideal Query:
Model……Gross……G ross A……Gross B……Gross C
A…………150.00…….. 150……….…0……………. .0
A………. 200.00………200……… ….0……………..0
B……….375.00………. .0…………375……………. .0
C……… 400.00………..0……… ….0……………..400
C………100.00……….. 0………….0……………..1 00
Total………………….…3 50………..375…………… .500
If anyone can help me on this, will be greatly appreciated
plaguna
Part of my Access Database has two fields that I want to work on: [Model] and [Gross]
[Model] has a drop down list with ( "A", "B", "C", etc,) options.
When I use the following expression, (in this case for Model “A”)
Code.
Abs(Sum([Table].[Gross] And ([Table].[Model]="A"))) AS [Total A Gross]
I get the count of the number of records that the Model "A" has, which is 2. Instead, my intension is to get the total Gross amount of it, which is $350.00.
Model……Gross……G ross A
A…………150.00…..… ….1
A……….. 200.00.………..1
B………..375.00.…… ……0
C………..400.00... ……...0
C……..…100.00……… ...0
Total………………………. 2
What would it be the correct expression to get the Total Gross of each Model individual?
Something like this would be the ideal Query:
Model……Gross……G ross A……Gross B……Gross C
A…………150.00…….. 150……….…0……………. .0
A………. 200.00………200……… ….0……………..0
B……….375.00………. .0…………375……………. .0
C……… 400.00………..0……… ….0……………..400
C………100.00……….. 0………….0……………..1 00
Total………………….…3 50………..375…………… .500
If anyone can help me on this, will be greatly appreciated
plaguna
Comment