Dear Experts,
I got an issue, what I don't understand.
Scenario:
I plan to set up a little sales planning with a profit and loss planning on top of it.
Dimension: SalesAccount (Type = A)
I wrote a little script logic, which calculates the values for Total Sales Revenue, Total Sales Profit and Total Cost of Goods Sold. It looks as follows (extract):
*WHEN SalesAccount
*IS "SALESQUANTITY"
*REC(SALESACCOUNT = "TOTALSALESREVENUE", EXPRESSION = %VALUE%*[SalesAccount].[SALESUNITPRICE])
*REC(SALESACCOUNT = "TOTALCOGS", EXPRESSION = %VALUE%*[SalesAccount].[UNITCOST])
*REC(SALESACCOUNT = "TOTALSALESPROFIT", EXPRESSION = %VALUE%*[SalesAccount].[SALESUNITPRICE] - %VALUE%*[SalesAccount].[UNITCOST])
*ENDWHEN
*WHEN SalesAccount
*IS "SALESUNITPRICE"
*REC(SALESACCOUNT = "TOTALSALESREVENUE", EXPRESSION = %VALUE%*[SalesAccount].[SALESQUANTITY])
*REC(SALESACCOUNT = "TOTALSALESPROFIT", EXPRESSION = %VALUE%*[SalesAccount].[SALESQUANTITY] - [SalesAccount].[TOTALCOGS])
*ENDWHEN
*WHEN SalesAccount
*IS "UNITCOST"
*REC(SALESACCOUNT = "TOTALCOGS", EXPRESSION = %VALUE%*[SalesAccount].[SALESQUANTITY])
*REC(SALESACCOUNT = "TOTALSALESPROFIT", EXPRESSION = [SalesAccount].[TOTALSALESREVENUE] - %VALUE%*[SalesAccount].[SALESQUANTITY])
*ENDWHEN
After creating an input schedule and planning some values (Sales Quantity, Sales Unit Price and Unit Cost), I was pretty surprised about the result in the BW cube. Please see the calculated values below:
/CPMB/I2DU3M2 | /CPMB/I2DMVXI | /CPMB/I2DP06T | /CPMB/I2DS04D | /CPMB/I2DC8OY | /CPMB/I2DRIK6 | /CPMB/I2DQTUC | /CPMB/SDATA |
2012.001 | PLAN | SalesTeam1 | SALESQUANTITY | PH11 | USD | C100005 | 1'000.00 |
2012.001 | PLAN | SalesTeam1 | SALESUNITPRICE | PH11 | USD | C100005 | 9'500.00 |
2012.001 | PLAN | SalesTeam1 | UNITCOST | PH11 | USD | C100005 | 450.00 |
2012.001 | PLAN | SalesTeam1 | TOTALCOGS | PH11 | USD | C100005 | 10'950'000.00 |
2012.001 | PLAN | SalesTeam1 | TOTALSALESPROFIT | PH11 | USD | C100005 | -21'900'000.00 |
2012.001 | PLAN | SalesTeam1 | TOTALSALESREVENUE | PH11 | USD | C100005 | -10'950'000.00 |
Could somebody please explain me, how Total Sales Revenue, Total Sales Profit and Total Cost of Goods Sold are calculated regarding the different account types mentioned before? I don' t understand that so far
Thank you in advance,
Karsten