Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7846

Query on calculation context

$
0
0


Hi Team,

 

In my inventory cube the stock values are stored at plant level  and the stock quantities are stored at plant and storage location or at plant level. The column P1/Not assigned indicates that there is no storage location available for that record.

 

The data set will look like below

 

plant storage locationMaterialstock valuestock qty
P1P1/Not assignedMat11257.340
P1P1/Not assignedMat27361.31
P1P1/Not assignedMat313.480
P1P1/Not assignedMat4377.90
P1P1/Not assignedMat5273.50
P1P1/C01Mat3030
P1P1/C01Mat500
P1P1/C03Mat101
P1P1/C03Mat4041
P1P1/C07Mat506

 

 

The expected output  looking at webi level is

 

 

Plantstorage locationTotal stock valuetotal stock qty
P1P1/not assigned7361.31
P1P1/C0113.4830
P1P1/C031635.2442
P1P1/C07273.56

 

 

To achieve above result I tried to calculate the unit price for each material then multiply with the quantity

 

The formula I  used to calculate unit price is  (stock value in (plant,material)/ stock qty in(plant,material))

 

Total stock value = stock qty * unit price , When used this formula on the block I am getting the total stock value as 9286.53 which is the total stock value for the entire plant. Where as I am trying to calculate the total value for each plant and storage location level.

 

Can anybody give some input on the calculation context can be used to get the above result.

 

Thanks,

Jo.


Viewing all articles
Browse latest Browse all 7846

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>