Skip to main content
Solved

Figuring out bonus amounts based on ARTran.TranAmt

  • 10 July 2024
  • 6 replies
  • 33 views

I have a GI titled New Accounts. Sales reps get either a $500.00 bonus if their first initial order with a new customer is >= $5,000.00 - $9999.99, and $1,000.00 if the initial order is > $10,000.00. My IIF statement is as follows:

=IIF([ARTran.TranAmt] >= 5000.00, (IIF([ARTran.TranAmt] < 10000.00, 500.00,
IIF([ARTran.TranAmt] >= 10000.00), 1000.00))). The Inquiry errors out when being run. I’ve tried using SWITCH also to no avail. Maybe my syntax is not correct? It does Validate with no errors. 

6 replies

Userlevel 7
Badge +5

Hi @wmatthews1877 

Please try with the IIF statement below:

=IIf( [ARTran.TranAmt] >= 5000.00 AND [ARTran.TranAmt] < 10000.00 , 500.00
, IIf( [ARTran.TranAmt] >= 10000.00, 1000.00, 0.00 ) )

 

Best Regards,

NNT
 

Userlevel 4
Badge +1

Thank you for helping with this issue, but there is a glitch with it. There are sales amounts that are 17,465,  (that one came up with 500.00 bonus, should have been 1000), 17,338.61 (no bonus), 5,638.40, 6,972.18, 8,377.56 (no bonus of 500), 12,710.90 (500 bonus, should have been 1000). I do have the Schema Field set to ARTran.TranAmt. I even tried reversing the coding for the >= 10000.00 to come first, same results.

Userlevel 7
Badge +5

Hi @wmatthews1877 

Please send the screenshot of the issue as you said and send the xlm file of your GI.

 

Best Regards,

NNT

Userlevel 4
Badge +1

As an added bit of information; going through some of the other results, there is one sales that came up with a 500.00 bonus for 119,834.62, and another sales that came up correctly with 1000 bonus for 39,105.76 which is really weird.

Userlevel 4
Badge +1

I was able to figure it out. The formual that I went with is:

=SWITCH(([ARTran.NetSalesAmount] >= 10000.00), 1000.00,([ARTran.NetSalesAmount] >= 5000.00 AND [ARTran.NetSalesAmount] < 10000.00), 500.00)

All I did was just switch (no pun intended) it around and it’s working like a champ. 

For the sales amount I went with the following formula:

=SWITCH(([ARTran.NetSalesAmount] < 5000.00), 0.00,([ARTran.NetSalesAmount]))

 

Thank you for your input as it got me started in the correct direction.

 

Userlevel 7
Badge

Thank you for sharing your solution with the community @wmatthews1877!

Reply