
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to do set analysis in this Aggr Sum expression
Hi Guys,
I am using following Expression in text box to show sum of total paid amount for orders.
=sum(Aggr([Paid Amount], OrderId,[Paid Amount]))
Where Can I add 'if' statement or set analysis in this expression to only see total amount where [Sales Rep] = 'James' ?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this.
=sum(Aggr(If([Sales Rep] = 'James',[Paid Amount]), OrderId,[Paid Amount]))
Or
=sum(Aggr(Sum({<[Sales Rep] = {'James'}>}[Paid Amount]), OrderId,[Paid Amount]))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try like this
aggr( sum({< [Sales Rep] = {'James'} >}[Paid Amount])OrderId)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Stephen, but did not work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think you need to use Aggr function for that.
The below should do -
sum({< [Sales Rep] = {'James'} >}[Paid Amount])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this.
=sum(Aggr(If([Sales Rep] = 'James',[Paid Amount]), OrderId,[Paid Amount]))
Or
=sum(Aggr(Sum({<[Sales Rep] = {'James'}>}[Paid Amount]), OrderId,[Paid Amount]))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure how and where you using this, but may be this (if what Naresh provided doesn't work for you)
=Sum({<[Sales Rep] = {'James'}>}Aggr(Only({<[Sales Rep] = {'James'}>}[Paid Amount]), OrderId,[Paid Amount]))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your replies guys..
Almost everyone's expression worked.. but I picked Tamil's for now
Thanks
