Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a formula result in a formula

Status
Not open for further replies.

Shannon2008

Technical User
May 28, 2008
17
CA
This is probably quite easy and I think I am just missing something, but I can't seem to use a formula result in another formula.

Sample
if {@Division}= "abc" THEN{@NEER Value}+{@ Split}ELSE
IF {@Division}="efg" THEN {@NEER Value}+{@ Split} ELSE
IF {@Division}="hij" THEN {@NEER Value}+{@ Split} ELSE 0

Example:
if Neer Value = 100 and Split =99 then I would expect my result to be 133 however I am getting a result of 100.

Appreciate the help.
 
Need to see the NEER and split formula

But having said that in your example I can not see how 100 +99 = 133?

Ian
 
When you show formulas, you must show the content of ALL nested formulas as well.

It looks like you are expecting {@split} to be adjusted by the number of records, you maybe all you need to do is:

if {@Division} in ["abc","efg","hij"] THEN
{@NEER Value}+ ({@ Split}/distinctcount({@Division}))

-LB
 
The nested formulas are
Division =
IF {QUARTDED.PROCESS_LEVEL} startswith "B" THEN "abc" ELSE
IF {QUARTDED.PROCESS_LEVEL} startswith "C" THEN "efg" ELSE
IF {QUARTDED.PROCESS_LEVEL} startswith "I" THEN "hij" ELSE
IF {QUARTDED.PROCESS_LEVEL} startswith "K" THEN "x"

NEER Value =
{?NEER Value}*{@Premium Percentage}

Premium Percentage =
Sum ({QUARTDED.DED_AMT}, {@Division})/Sum ({QUARTDED.DED_AMT})

I made a mistake earlier in my example.
Example:
if Neer Value = 100 and Split =33 then I would expect my result to be 133 however I am getting a result of 100.

Thanks for the help.

 
YOu can not use a formula which refers to itelf.

YOu need to do something like the formula suggested by LB and remove Division from within Division, ie via NEER -> Percetage Premium.

Ian
 
And what is the content of the {@Split} formula?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top