Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Most Recent Sales by Salesperson

I need help solving a situation. Let's suppose I have a table with up to 3 records for each salesperson. The date will have a Sales Date, Sales Person, and Sales Amount. I need a formula to calculate the average sales using only the most recent sale for each Sales Person.

Any ideas?

Thanks in advance.

Todd

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Okay, I think I figured it out but Thought I would share my solution as it will hopefully save someone time in the future.

I used a combination of the AGGR function and the FirstSortedValue function.

=Avg(Aggr(FirstSortedValue([Sales Amount],-SaleDate),[Sales Person]))

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Okay, I think I figured it out but Thought I would share my solution as it will hopefully save someone time in the future.

I used a combination of the AGGR function and the FirstSortedValue function.

=Avg(Aggr(FirstSortedValue([Sales Amount],-SaleDate),[Sales Person]))

luismadriz
Specialist
Specialist

Thanks Todd, can you please share a screenshot of that table where you have that calculation? I struggle with those,

Cheers,

Luis