Wednesday 30 May 2007 6:17:49 pm
The percentage calculation in my poll is wrong.
63 votes of 116 is 35% 26 votes of 116 is 15% Obviously that is not right... I guess there must be something wrong in the following code. Am I right?
{let percentage = cond( $total_count|gt( 0 ), round( div( mul( $:item_count, 100 ), $total_count ) ), 0 )
tenth = cond( $total_count|gt( 0 ), round( div( mul( $:item_count, 10 ), $total_count ) ), 0 )}
_____________________________________
Blog: http://www.kristofferkarlsson.com
Website: http://www.spelkanalen.com
|