Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all
i have this condition, regardless of revenue if profit is positive number i have to show +ve margin otherwise negative number
how can I achieve this?
if sum(profit) < 0 and sum(revenue) < 0, -(sum(profit)/sum(revenue)
if sum(profit) < 0 and sum(revenue) > 0, -(sum(profit)/sum(revenue)
if sum(profit)> 0 and sum(revenue) < 0, (sum(profit)/sum(revenue)
if sum(profit)> 0 and sum(revenue) > 0, (sum(profit)/sum(revenue)
can you simplify the above if statement?
Regards
Gautham
May be this?
if(RangeSum(profit, revenue) < 0, -RangeSum(profit,revenue),
if(sum(profit) < 0 and sum(revenue) > 0, -RangeSum(profit, revenue)
if(sum(profit)> 0 and sum(revenue) < 0, RangeSum(profit,revenue)
if( RangeSum(profit, revenue) > 0, RangeSum(profit,revenue)))))