Calculate percentage based on two fields, one of which is an embedded view
i tried in output code:

&lt;?php 
echo count($row-&gt;field_a) + count($row-&gt;field_a) ;
?&gt;


and the result is:


I modified the view, and used aggregation.



I modified the field a:



I modified the field b:



I modified the field php:



And the code:



And result: