Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey everyone,
Is there an advantage or difference between using sum(if)) vs if(sum())?
There is a big difference:
=sum(if( Condition, Then, Else))
Here the condition is evaluated on record level, the result of each evaluation is then aggregated.
=If( sum(), Then, Else)
Here the aggregation happens first, then the result of the aggregation is used in the condition to decide on Then or Else branch.
Yes there are differences. If I rembemer correctly has hic this in one of his blog-postings explained. But better is you forget about it and used instead set analysis, like : sum{< Dimension = {'Some Values'}>} Value)
- Marcus
There is a big difference:
=sum(if( Condition, Then, Else))
Here the condition is evaluated on record level, the result of each evaluation is then aggregated.
=If( sum(), Then, Else)
Here the aggregation happens first, then the result of the aggregation is used in the condition to decide on Then or Else branch.