on 10-14-2008 5:00 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
u can use variables for the same and call them in ur fox code using
varv function.
srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.