Skip to Content
Menu
This question has been flagged
1 Reply
1785 Views

Hey i have 3 columns obtain mark , total mark and percentage. I am getting all the data from sql query and its working fine. But when we group by it adds everything and my percentage exceeds 100%. I have tried using average but its not accurate enough. Is there a way of finding percentage after using group by?

Thanks in advance, kindly help.

Avatar
Discard
Best Answer

Hello,

all you need to do is add group_operator="avg" in you custom field :

example:

custom_field = fields.Float(
string='Rate %', group_operator="avg")

Avatar
Discard