I have been on a crusade to eliminate if statements in expressions.
I have the below statement that I don't know if Set would help.
If anyone has thoughts I would appreciate it.
Sum ([ A ]) - sum(if(IsNull([ B] ),[ C ],[ B ]))
Basically this subtracts B from A unless B is null then is uses C
I tried this:
(isnull(B)*-1)*C + (isnull(B)+1)*B
But if B is null you can't calculate with it: x+null = null
You only can calculate with independent Values:
(isnull(A)*-1)*C + (isnull(A)+1)*B
This means if A is Null sum(C) else sum(B)
Retrieving data ...