Unable to calculate percentage

I have a table as below ,
Carrots RedCarrots PurpleCarrrots % Of Red Carrots % Of PurpleCarrots.
20 8 12 ? ?
30 7 15 ? ?

how can we calculate this using custom expressions, it just lists the aggregated function under view

Hi @rojoe_joseph
Which version of Metabase?
It sounds like you’re looking for Custom Fields, located to the right under ...

Thanks , i tried that i am unable to use the custom expressions under View i that screen, As i need to group the data. In the custom expression it vertically aggregates it instead of horizontal.

Okay, yes, it’s not available under View, but it’s available under Grouped By and Filtered By.
Another way, you can create a Native Query (SQL) and save the question, then you can use it as “Saved Question”.