Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
andreyfcdk91
Creator
Creator

Aggregated sum by max date

Good day!

I have some source:

   

IdDateSales
115.02.201645
116.02.2016654
215.02.201654
216.02.20161
315.02.201645

I expression i need to calculate Sales by Id. if some Id has more then one Date, expression must get max date.

Thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try FirstSortedValue(Sales, -Date)


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

Try FirstSortedValue(Sales, -Date)


talk is cheap, supply exceeds demand

View solution in original post

sunny_talwar

Implementation of Gysbert's suggestion:

Capture.PNG

andreyfcdk91
Creator
Creator
Author

Thanks!

andreyfcdk91
Creator
Creator
Author

Thank you!

Can i use filters inside this expr?

sunny_talwar

You sure can

jolivares
Specialist
Specialist

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.

sunny_talwar

You can add set analysis to FirstSortedValue function:

FirstSortedValue({<Field = {'Something'}>} Sales, -Date)