Skip to main content
Solved

Figuring out bonus amounts based on ARTran.TranAmt


Forum|alt.badge.img+1

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. 

Best answer by wmatthews1877

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.

 

View original
Did this topic help you find an answer to your question?

6 replies

nhatnghetinh
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 362 replies
  • July 11, 2024

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
 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • 112 replies
  • July 11, 2024

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.


nhatnghetinh
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 362 replies
  • July 11, 2024

Hi @wmatthews1877 

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

 

Best Regards,

NNT


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • 112 replies
  • July 11, 2024

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.


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • 112 replies
  • Answer
  • July 11, 2024

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.

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2621 replies
  • July 11, 2024

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings