cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in writing Fox Formula

Former Member
0 Kudos
91

Hello All,

I need to write a formula to fill values in the key figure.

The value is to be sum of other two input ready key figures.

ex a = b +c ( B and c are input ready key figures)

To implement this i have to write a fox formula in planing function.

I am new to Integrated Planning.

Please let me know how this formula will be written.

Regards,

Pratighya.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

data KFA type F.

data KFB type F.

data char1 type CHARA.

Foreach char1.

kfa = kfa + { kf1,char1}.

Kfb = kfb + {kf2,char1}.

endfor.

Foreach char1.

{kf1,char1} = {kf2,char1}*kfa/kfb.

endfor

Fields to be changed are CHARA, KF1,KF2.

Former Member
0 Kudos

Hi,

If you want to do a simple calculation like price = Quantity * Revenue for the year 2009. Then the code is

Data prc type f.

Data qty type f.

Data rev type F.

data d type 0fiscyear.

prc = {2009,zprice}.

qty = {2009,zquantity}.

rev = {2009,zrevenue}.

= * . {2009,zprice} = .

Here prc,qty,rev are some buffer variables created here. zprice, zquantity, zrevenue are the keyfigures of your Infoprovider. 0fiscyear is the Time Characteristic of your Info Provider.

Fields to be changed should be Ofiscyear becoz you are restricting the data based on year.

If you dont want to restrict then the code will be

Data prc type f.

Data qty type f.

Data rev type F.

prc = .

qty = .

rev = .

prc = qty * rev.

Regards,

Pushpa M

Former Member
0 Kudos

Hi

Create a formula function for same.

value to be changed as - select KF

Define the KF type with relevant KF type.

{KF-A} = {KF-B} +{KF-C}

Thanks

Former Member
0 Kudos

Hi Debasish,

I had a same requirement like i have 10 keyfigures and i need to sum up all key figures and place in into one keyfigure so the code is like :

If any thing wrong please correct me.

{kf type) = {kf1}................

Fields to be changed is to be kf to kf2 and kftype.

if it is correct let me know.

Former Member
0 Kudos

Hi Debasish,

I had a same requirement like i have 10 keyfigures and i need to sum up all key figures and place in into one keyfigure so the code is like :

If any thing wrong please correct me.

{kf type) = {kf1}................

Fields to be changed is to be kf to kf2 and kftype.

if it is correct let me know.