I sorted by EAN with the expression as follows. This will aggregate the opportunity trans cost at the SKN level and take the max for each EAN . So the EAN's will be grouped together starting from the EAN that has SKN with the highest value in the data set.
Next i sorted by opportunity trans cost by 'numeric value'
((sum(PRJSALES)-sum(SALESTY)-Sum(INVENTORY))*[NET_COST_EUR])-(sum(PRJSALES)-sum(SALESTY)-Sum(INVENTORY))*([MIN NET COST €]+([AVG. COST PER FT3]*[MAX CUBE])),