
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sum(if(...)) vs If(Sum(...), Sum(...))
Hey everyone,
Is there an advantage or difference between using sum(if)) vs if(sum())?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
