I am using Views module. The view has three columns.
In the third column, I want a calculated percentage using the first two columns of the view.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
You can use global php to acheive this (not recommended)
The best way to do it is by using this hook_views_pre_render(&$view) in your theme template file or in your custom module.
You can use Global:Math Expression in views to perform mathematical operations.
You would need tokens if you want to use your fields to perform calculations.
It is pretty simple to calculate percentage using this.
For example, to calculate percentage using two fields [field1] and [field2],
you can do it like
I hope its clear.