my formula reads like this but i need to group by this formula and it does not show up to group by it.
if GroupName ({oe_line_1000.budget_code}) startswith "P"
then
left(GroupName ({oe_line_1000.budget_code}),5)
else
left(GroupName ({oe_line_1000.budget_code}),4)
if GroupName ({oe_line_1000.budget_code}) startswith "P"
then
left(GroupName ({oe_line_1000.budget_code}),5)
else
left(GroupName ({oe_line_1000.budget_code}),4)