Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table that look like this:
Date Amount
01/01/2013 40,000
01/02/2013 50,000
01/04/2014 55,000
01/06/2015 9,000
I need to take greater amount and the date of this amount.
For example: the result in this case would be 55,000 and 01/04/2014
I have tryied to use FirstSortedValue function but it's doesn't word because it return the first or the las value.
King regards!
Try this:
='Geater selling day' & Chr(13) & FirstSortedValue(Date, -Aggr(Sum(Amount), Date)) & Chr(13) & Max(Aggr(Sum(Amount), Date))
Is amount a field in your database or is this a expression like this -> Sum(Amount)
May be this in a text box:
Amount -> Max(Aggr(Sum(Amount), Date))
Date -> FirstSortedValue(Date, -Aggr(Sum(Amount), Date))
No.. this example return the last date.
I just typed an example width the result i need. in the example table the last date is 01/06/2015 but i don't want the last date; i just want the date for that amount. example:
Amount: 55,000
Date: 01/04/2014
your result would by:
Amount: 55,000
Date: 01/06/2015 and that's not correct
maybe also, in a straight table chart,
sorting by sum(Amount) descending
and in presentation tab max number --> 1
maybe also, in a straight table chart
using dimension limit
the problem is tha I'm building the table in memory, so i have an set anlysis using aggr function ordering by date.
this value will be displayed in a textbox object; is for that i want to take the greater amount and his date. the textbox will say:
Greater selling day
01/04/2014
55,000
I'm looking for thats.
Have you looked at what I proposed for text box object?
See attached:
I've tried your answer but i'm geeting the next error.
Error: Error in expression:
Nested aggregation not allowed
I'm using this expression:
='Greater selling day&Chr(13)&
Concat(FirstSortedValue(Fecha, -Aggr(Sum(Amount), Fecha)))
&Chr(13)& Num(vMaximoCobrado,'#,###.##')
vMaximoCobrado is a variable i have containing the greater amount.
Why are using Concat() function here? Can you elaborate?
the concat function is for concat the Date to text Greater selling day and the amount.