cancel
Showing results for 
Search instead for 
Did you mean: 

BPS FOXCODE

Former Member
0 Kudos

Hi BI Experts,

Can anyone help me in writing syntax for FOX CODE in BPS?

I have a requirment to calcuate percentage for current year planned sales based on my Previous year. I should be able to give values at runtime which reflects accordingly.

Thanks in advance,

Pushpa.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create a variable of type characteristic value and user defined variable in BPS for current year planned sales. Keep the replacement type as user defined. Check input required by user and the other check box also. Suppose the variable is "salecurrent"

You must be having some version to defferentiate between planned data and actuals. If not then also no problem.

Create a fox type planning function. Fields to be changed can be the keyfigure name (example sales), year.

First create a local variable (example sale) and fetch the value of salecurrent and store it in sale.

sale = varv (salecurrent).

The calculation would be sale * 100 / {sales, 2008}.

This will calculate the percentage. This result can be stored in some other keyfigure as per your convinence. If you are storing in some other keyfigure (example perc), then the code should look something like

var sale type 0keyfigure. - specify the keyfigure

{perc, 2009} = sale * 100 / {sales, 2008}.

In the above formula, the percentage has been stored in perc keyfigure for the year 2009. You can customize it more according to your requirement.

Please award points if helpful.

Answers (2)

Answers (2)

Former Member
0 Kudos

HiNilanjan,

Thanks a lot. Your reply helped me a lot. Can you tell me how can we define variable of type DATE & CHAR.

Thanks in advance

Pushpa M

Former Member
0 Kudos

HI

u can use variables for the same and call them in ur fox code using

varv function.

srini