Ok, now I am really stuck, here goes. I have the following formula
if {@Avg Cost}<={@Rank Avg Cst}
then 1
else if {@Avg Cost}<=({@Rank Avg Cst}*1.1)
then 2
else if {@Avg Cost}<=({@Rank Avg Cst}*1.2)
then 3
else if {@Avg Cost}<=({@Rank Avg Cst}*1.3)
then 4
Here is the @avg Cost formula
if {@Total Trips}<>0
then ({@Comp $ Paid}+{@NS $ Paid})/{@Total Trips}
else 0
Here is the @ rank Avg cost formula
{@Rank Cost}/{@Rank Count}
What I am wanting is the following:
Average Cost Ranking
VDR ABC 34.56 1
VDR DEF 38.97 2
VDR GHI 45.62 3
STATE AVG 39.71
With my 1st formula above I am trying to rank the individual vendors based on the % they are within the state average. What doesn't seem to work is the @avg cost formula but ONLY in the 1st formula.
if {@Avg Cost}<={@Rank Avg Cst}
then 1
else if {@Avg Cost}<=({@Rank Avg Cst}*1.1)
then 2
else if {@Avg Cost}<=({@Rank Avg Cst}*1.2)
then 3
else if {@Avg Cost}<=({@Rank Avg Cst}*1.3)
then 4
Here is the @avg Cost formula
if {@Total Trips}<>0
then ({@Comp $ Paid}+{@NS $ Paid})/{@Total Trips}
else 0
Here is the @ rank Avg cost formula
{@Rank Cost}/{@Rank Count}
What I am wanting is the following:
Average Cost Ranking
VDR ABC 34.56 1
VDR DEF 38.97 2
VDR GHI 45.62 3
STATE AVG 39.71
With my 1st formula above I am trying to rank the individual vendors based on the % they are within the state average. What doesn't seem to work is the @avg cost formula but ONLY in the 1st formula.