Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day!
I have some source:
Id | Date | Sales |
1 | 15.02.2016 | 45 |
1 | 16.02.2016 | 654 |
2 | 15.02.2016 | 54 |
2 | 16.02.2016 | 1 |
3 | 15.02.2016 | 45 |
I expression i need to calculate Sales by Id. if some Id has more then one Date, expression must get max date.
Thanks.
Try FirstSortedValue(Sales, -Date)
Try FirstSortedValue(Sales, -Date)
Implementation of Gysbert's suggestion:
Thanks!
Thank you!
Can i use filters inside this expr?
You sure can
The expression is:
FirstSortedValue(Sales, -Aggr(Max(Date(Date#(Date,'DD.MM.YYYY'))),Id,Date ))
But you have to take care of your field "Date", is better if you put in the correct format.
You can add set analysis to FirstSortedValue function:
FirstSortedValue({<Field = {'Something'}>} Sales, -Date)