B
Bon
Hi All,
I have a table with the following attributes:
Customer_Code, Product_Code, Category, Month, Value
Where "Category" has the domain BudgetTurnover and ActualTurnover
and "Month" is of type Date/Time.
The budget figures have been entered for the year.
I get the actual monthly figures at the end of each month.
What I want to do is get a table which looks like this for a given month:
Customer_Code Product_Code Value(ActualMTD) Value(BudgetMTD) Variance(MTD)
Value(ActualYTD) Value(BudgetYTD) Variance(YTD)
It could also be that I want to change the columns slightly and get:
Sale_Representative Product_Code Value(ActualMTD) Value(BudgetMTD)
Variance(MTD) Value(ActualYTD) Value(BudgetYTD) Variance(YTD)
I have working out (with help of David Seeto on this site), how to get the
MTD figures but have a mental block how to get the YTD figures as well.
Can someone help me out say with the appropriate SQL perhaps?
Thanks
Bon
I have a table with the following attributes:
Customer_Code, Product_Code, Category, Month, Value
Where "Category" has the domain BudgetTurnover and ActualTurnover
and "Month" is of type Date/Time.
The budget figures have been entered for the year.
I get the actual monthly figures at the end of each month.
What I want to do is get a table which looks like this for a given month:
Customer_Code Product_Code Value(ActualMTD) Value(BudgetMTD) Variance(MTD)
Value(ActualYTD) Value(BudgetYTD) Variance(YTD)
It could also be that I want to change the columns slightly and get:
Sale_Representative Product_Code Value(ActualMTD) Value(BudgetMTD)
Variance(MTD) Value(ActualYTD) Value(BudgetYTD) Variance(YTD)
I have working out (with help of David Seeto on this site), how to get the
MTD figures but have a mental block how to get the YTD figures as well.
Can someone help me out say with the appropriate SQL perhaps?
Thanks
Bon