0

reguarding this questiong How do i Generate different calculations depending on what item is selected in drop down box?

How would I do this calculation?

while the calculation for ISDN is = ((len_26 + bt_26 + dlen_26 + dbt_26) * 2.81) + ((len_24 + bt_24 + dlen_24 + dbt_24) * 2.03) + ((len_22 + bt_22 + dlen_22 + dbt_22) * 1.42) + ((len_19 + bt_19 + dlen_19 + dbt_19) * 0.84); of course the fields such as len_22 and bt_22 are in my database already...

1 Answer 1

0

Try this

=(([len_26] + [bt_26] + [dlen_26] + [dbt_26]) * 2.81) + (([len_24] + [bt_24] + [dlen_24] + [dbt_24]) * 2.03) + (([len_22] + [bt_22] + [dlen_22] + [dbt_22]) * 1.42) + (([len_19] + [bt_19] + [dlen_19] + [dbt_19]) * 0.84)

Updated based on comment

=IF([Circuit Type]="ISDN",(([len_26] + [bt_26] + [dlen_26] + [dbt_26]) * 2.81) + (([len_24] + [bt_24] + [dlen_24] + [dbt_24]) * 2.03) + (([len_22] + [bt_22] + [dlen_22] + [dbt_22]) * 1.42) + (([len_19] + [bt_19] + [dlen_19] + [dbt_19]) * 0.84),IF([Circuit Type]="HDSL",[N1]-[N2],IF([Circuit Type]="HDSL2",[N1]*[N2],IF([Circuit Type]="HDSL3",[N1]/[N2],IF([Circuit Type]="HDSL4",[N1],0)))))
4
  • Thank you so much this did work for me, but I have a question, is it possible to do two calculations when the user chooses a selection... so if ISDN is chosen, I want variable1 to do this calculation var1 =(([len_26] + [bt_26] + [dlen_26] + [dbt_26]) * 2.81) + (([len_24] + [bt_24] + [dlen_24] + [dbt_24]) * 2.03) + (([len_22] + [bt_22] + [dlen_22] + [dbt_22]) * 1.42) + (([len_19] + [bt_19] + [dlen_19] + [dbt_19]) * 0.84) and then var2=(([pen_26] + [pt_26] + [plen_26] + [pbt_26]) * 2.81) + (([pen_24] + [pt_24] + [plen_24] + [pbt_24]) * 2.03) + (([pen_22] + [pt_22] + [plen_22] + [pbt_22]) * 1.42) Commented Nov 28, 2014 at 18:30
  • @MattLudwig see my edit Commented Nov 28, 2014 at 18:58
  • Thankyou Bhai I will add another calculated column, and for the first column if I am doing a if statement will it go like this? =IF([Circuit Type]="ISDN (([len_24] + [bt_24] + [dlen_24] + [dbt_24]) * 2.03) + (([len_22] + [bt_22] + [dlen_22] + [dbt_22]) * 1.42) + (([len_19] + [bt_19] + [dlen_19] + [dbt_19]) * 0.84),IF([Circuit Type]="HDSL",[len_26] + [bt_26] + [dlen_26] + [bt_26]) * 100) + (([len_24] + [t_24] + [len_24] + [bt_24]) * 200),IF([Circuit Type]="HDSL2",[len_26] + [bt_26] + [dlen_26] + [bt_26]) * 1.58) + (([len_24] + [t_24] + [len_24] + [bt_24]) * 2.3))) LIKE THAT? Commented Nov 28, 2014 at 18:59
  • did I do the )))) at the end correctly? Commented Nov 28, 2014 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.