Sum of current group function is not working with if condition
I have a requirement to sum the total price based on item id.I have added group by function on item id and used the sum of current group function for summing the total price.But,I have if condition based on which I need to display the sum else other price.
Below code,I have written
<?xdofx:if xyz (field name) in ('a','b','c')
then TOTAL_COST else sum(current-group()/EXTENDED_COST) end if?>
Please let me know what is wrong in this.
Thanks
Suchita