Salse Portion

I want to calculate “Salse Portion”:
How do you do that?!

Hi @nurit.a
It sounds like you’re looking for Custom Expressions:

@flamber tnx
but i am looking for a SQL function for this problem

@nurit.a Okay, then go to and try to find SQL for the database type you’re using.

This is the way to the solution:
SELECT SUM(netIncome) AS 'net ’
,net/ ( SELECT sum(netIncome) from ALLOrders ) as “percent to total”
from ALLOrders
group by category