cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAC Data Action - Calculating Allocation % is not summing to 100%

zee_siddique15
Explorer
0 Kudos
469

zee_siddique_0-1729229877999.png

Hi All ,

1) I have the Kgs produced (Decimal to 7 places) measure to store the data at Farm and Product level, Material = "#" and Customer = "#" (input by users)

zee_siddique_1-1729230189552.png

 

2) I have the Kgs Sold (Decimal to 7 places) measure to store the data at Farm = "#" and Product , Material and Customer level (input by users)

zee_siddique_2-1729230209996.png

 

3) Price ($/Kg) entered at Farm = "#" and Product, Material and Customer level (input by users) 

zee_siddique_3-1729230226593.png

 

3) Data Action Starts:- 

Step 1: - Calculates the Allocation % based on the Kg produced data (you can see that the data is not summing up to 100%

zee_siddique_4-1729230273330.png

 

2) Step 2:- Calculate the Sales Qty (Trays) = Sales Qty (Kgs) / Kgs to Tray Conversion Factor 

zee_siddique_5-1729230379876.png

3) Step 3:- Calculate the Sales Qty (Pallets) = Sales Qty (Kgs) / Kgs to Pallet Conversion Factor 

zee_siddique_6-1729230430490.png

4) Step 4:-  Calculate the Sales Revenue ($) = Sales Qty (Kgs) * Price ($/Kg)

zee_siddique_7-1729230475624.png

5) Step 5:- Bringing down the Sales Qty (Kgs/Trays/Pallets/Revenue) pushed down from Farm = # to individual Farms (Farm 1/2/3/4) based on the Allocation %s calculated in Step 1 of the data action.

the Allocated data doesn't come down to round up to the because the allocation % are not 100% .

zee_siddique_8-1729230646126.png

is there any way I can have the allocation % to 100%.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

@zee_siddique15 

Because you Kg's produced data is already with 7 decimals, when you calculate the Allocation weight, it will require more than 7 decimal precision to get an exact sum of 1. In Excel its summing to 100% or 1 because you have more than 7 decimal precision there. Now SAC has 7 decimal precision for their measure so there is no way we can increase it. May be try to calculate the Residual amount which is not allocated and that will be 0.0000002 * Allocation Amount. You can re allocate this amount on existing weight and see if that helps. I tried it on excel and it seems to be working.

N1kh1l_0-1729242128032.png

Basically I am re allocating the residual Allocation amount (0.0000002 * 1666.666667 =0.0003333) using the same weight and then adding the original Allocated amount to the residual amount. I intentionally took the amount with decimals to see if it creates precision issue.

 

Hope this helps !!

Nikhil

 

 

 

zee_siddique15
Explorer
0 Kudos
Hi @N1kh1l , Thanks the suggestion did work. Thanks for your help

Answers (0)