How to compute and display value of some fields? I'm facing the issue but not found the way to resolve. is there any way to help me this.
The issue is that I want to display the total value (included sum and get percent, etc) of some fields depend on what value user select in list.
Value in table like that

Table locations:

Example:

ID Name values

1  US   20% 
2  UK   30%


Table Products

Example:

ID Name  Price
1  pro_A 10$
2  pro_B 20$


And what I want to display is to show the list locations and products to let user select as list.

Example: when user select us and pro_A, I want display a total field and computed it (10$*100)/20

Anyone can help me this or help me organize infomation by other ways as long as I can get the same result.
Have a look at the (fairly new) Math Field module (for D7). Some more details about this module (from its project page), which also details when the calculations actually happen:


  The Math Field module defines a new field type to dynamically calculate values on entity forms. This is an alternative to Computed Field
  that does not require the use of PHP Filter.
  
  Math expression fields are dynamically updated via ajax on the entity form as soon as all necessary fields are populated. If JavaScript is disabled, the field will be evaluated when the form is submitted. The result is stored in the database when the form is submitted.


For more details (step-by-step instructions), refer to either of these links:


the (amazing!) Community documentation about the Math Field module.
the interesting article about Introducing the Math Field module, which also includes some screenprints to see it at work (such as the the add/edit form example).


Bonus: you would not need the "PHP filter" (IMO only that should be a valid reason to investigate this alternative) ...