in magic ETL you have group by tile.
and it allows formulas if you type the below formula by hand it evaluates.
if you save the formula in a table and bring the value in the formula window it evaluates as string text and not formula