Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi ,
I facing problem below:-
sales transaction table
salesperson, trx. date, trx amount
May, 20141006, 10.00
May, 20141006, 20.00
Lee, 20141106, 20.00
May, 20140906, 10.00
Santa, 20141206, 30.00
Lee, 20140106, 40.00
May, 20140506, 10.00
my expected result : -
Sales person Latest sales date Amount
May 20141006 30.00
Lee 20141106 20.00
Santa 20141206 30.00
How can get sum amount ? any idea ...
FirstSortedValue(aggr(sum(fldamount),fldid,flddate) ,-aggr(flddate,flddate))
See attached qvw.
A large part of the problem you're facing is how you're loading in your dates. Your inline load isn't reading what you enter as a date. I assume this is just a sample app and isn't how you're actually loading in your data. The way you'd want to do it if you actually have a correctly formatted date field is:
straight table with sales person as a dimension
max(salesdate)
sum({<salesdate = ('=$(max(salesdate))')>}amount)
FirstSortedValue(aggr(sum(fldamount),fldid,flddate) ,-aggr(flddate,flddate))
See attached qvw.
Thank you