Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Finding a list of last records

Hello everyone,

I have a question. How can I find the newest record for a list of contacts? I have the following data

CustA,CustB,CustC,

and so on...

CustA has brought 500 items over the last 6 years

CustB has brought 300 items over the last 6 years

CustC has brought 800 items over the last 6 years

and so on...

The fields are

Customer, Transaction Date, Transaction Year, Item.

What I would like to find out is a list of the last transaction a customer has made so that I can see they are a current customer or a customer which used to buy from us but no longer does.

Thank you in advance for any help possible

Mark

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this:

Create a straight table chart with dimension Customer, then as expressions (whatever you want to display):

=Date(max([Transaction Date]))

=max([Transaction Year])

=FirstSortedValue(Item, -[Transaction Date])

I assumed that your Transaction Date has a numeric representation, like all dates created or interpreted correctly by QV.

Hope this helps,

Stefan

View solution in original post

4 Replies
Gysbert_Wassenaar

You can probably use the firstsortedvalue. See here for two video tutorials explaning what the function does and how to use it.


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

Maybe like this:

Create a straight table chart with dimension Customer, then as expressions (whatever you want to display):

=Date(max([Transaction Date]))

=max([Transaction Year])

=FirstSortedValue(Item, -[Transaction Date])

I assumed that your Transaction Date has a numeric representation, like all dates created or interpreted correctly by QV.

Hope this helps,

Stefan

Not applicable
Author

Hello Gysbert Wassenaar,

Thank you for the link, Very helpful.

mark

Not applicable
Author

Hello Swuehl,

Perfect, thanks a lot. Your help is highly appreciated

Mark