Forum Discussion
DimaMD
Solution Sage
4 years agoDivide value minus
Hello Community!
I have a task to calculate profit of two different types of sellary, and percentage, which every type consist from total amount of profit.
The problem is that in some cases we have loss in profit and as a result we have negative balance in total.
When we try to calculate percentage, as a result we divide positive profit and negative total, that is why we get negative percentage.
In our desired result we must see that in case where profit in one type of sellary is positive, then the percentage must also be positive.
Please help me to write a mesure which will complete my task
Example table
| Type of Sellary | profit | prct profit | desired result |
| Trading | 847 | -0,78% | 0,78% |
| Own production | -108 802 | 100,78% | -100,78% |
| Total | -107 955 | 100,00% |
1 Reply
- amitchandak
Super User