Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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' ?
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]))
try like this
aggr( sum({< [Sales Rep] = {'James'} >}[Paid Amount])OrderId)
Thanks Stephen, but did not work
I don't think you need to use Aggr function for that.
The below should do -
sum({< [Sales Rep] = {'James'} >}[Paid Amount])
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]))
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]))
Thanks for your replies guys..
Almost everyone's expression worked.. but I picked Tamil's for now
Thanks