Subtracting values from groups

2.3k Views Asked by At

I have a group having 2 different dates. The result that it outputs is like this:

PeriodID-----GroupName-----Value
16-----FUEL-----200
15-----FUEL-----800

Now I want to subtract 200 from 800. and desired result is 600

How Do I subtract these values from same group? any idea?

1

There are 1 best solutions below

2
On

This should work.

Create a formula and write below code.

Evaluateafter(firstproduct<Formula>);
Evaluateafter(Secondproduct<Formula>);

sum(<Product1>,<Dategrouping>)-sum(<Product2>,<Dategrouping>)

now you have the end result.

If this doesn't work let me know.