I want to create a field that is a percent value of 2 field: field_so_ho_dan and field_duoc_phu_song
how can i create result = (field_so_ho_dan / field_duoc_phu_song)*100
Srr for my bad english!
I want to create a field that is a percent value of 2 field: field_so_ho_dan and field_duoc_phu_song
how can i create result = (field_so_ho_dan / field_duoc_phu_song)*100
Srr for my bad english!
Comments
Comment #1
colanComment #2
joaomachado commentedWere you able to solve this... I too am trying to calculate a percentage from two fields. I get a value, but it is in decimal form and I do not know how to convert it to %.
I know the result just needs to be multiplied by 100 but I do not know how to do that.
I have 0.22 and it should be 21.5.
Here is what I have:
Code:
Then for Display I have:
$display_output = number_format($entity_field_item['value'] , 2 , '.' , ',');I have it set as a float!
Joao