W
WembleyBear
I have a query that summarises sales data for a particular month and cost
centre. The data comes from our accounting system and is held in a single
table in my database thus:
tblNominal
------------
CostCode - Long Integer
ExpenseCode - Long Integer
Desc - Text
Current - Double
YTD - Doube
Month - Text
Year - Text
The query sums the Current & YTD values for a particular month, grouping
them by the Description field. This works fine to sum the Sales for say
Retail (which is a group of Expense Codes) but I also want the query to show
the Margin for that type of sale in a neighbouring column. This value is not
held in the table, but could be calculated as there is a group of codes
having the description Retail Cost of Sales, and Retail Margin would be
Retail - Retail Cost of Sales. Is this possible? What would be the best way
of going about this?
Thanks
Martyn
centre. The data comes from our accounting system and is held in a single
table in my database thus:
tblNominal
------------
CostCode - Long Integer
ExpenseCode - Long Integer
Desc - Text
Current - Double
YTD - Doube
Month - Text
Year - Text
The query sums the Current & YTD values for a particular month, grouping
them by the Description field. This works fine to sum the Sales for say
Retail (which is a group of Expense Codes) but I also want the query to show
the Margin for that type of sale in a neighbouring column. This value is not
held in the table, but could be calculated as there is a group of codes
having the description Retail Cost of Sales, and Retail Margin would be
Retail - Retail Cost of Sales. Is this possible? What would be the best way
of going about this?
Thanks
Martyn