# Macro - Columnwise Sum

Hi,

The requirements is as below -

Columnwise sum is required to be calculated. Example is given below -

There are 4 locations each will contains planned order quantitied on each day.

Sum of the planned order quantities on each day is required to be calculated.

e.g.

P1 - 10 40 50

P2 - 20 40 30

P3 - 15 30 20

P4 - 40 25 10

Sum - 85 135 110

I am aware that the default sum is available in the planning book. But the 'sum' is going to be used in a macro which will be executed at a detailed level.

e.g. Percentage of planned order quantity is to be caluculated on each day.

For P1 on day 1 the percentage = (10/85) * 100

Is there any standard function which can calculate this percentage day wise ?

If not, how the sum on each day can be calculated so that it can be used to calculate the % ?

Regards,

YR

##### Add a comment
10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Jun 14, 2013 at 10:40 PM

The problem statement is quite confusing. P1/P2/P3/P4 are these locations? and 10, 40 & 50 are planned order qty on Day1, Day2 & day3 respectively?

##### Add a comment
10|10000 characters needed characters exceeded
• Former Member
Posted on Oct 14, 2015 at 12:42 PM

Hi YR,

Did you find a solution to your problem? I have similar requirement in my current project.

Any help would be greatly appreciated.

Thanks & Regards

Snehil

##### Add a comment
10|10000 characters needed characters exceeded
• Snehil,

Try to switch columns and rows. After loading data first select only "Distribution Receipt" KF. Then right click on the planning book (extreme left corner of the PB) and click switch columns/rows. Then drill on location. This will show you total along with locations per period.

Regards

Rahul