Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to find max Trans ID.

Hi All.

i need to find Max Trans ID of a customer at Max date for this i  did group customer ID and Max Trans date.i got it but how to get Max Trans ID of a customer.


Thanks

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Like this?

Customer:

LOAD [Customer ID],

    [Tran Date],

    [Trans ID]

FROM

[Book1.xlsx]

(ooxml, embedded labels, table is Sheet1);

Customer_G:

LOAD [Customer ID],

  Max(Date([Tran Date])) as Max_Trans_Date,

  MaxString([Trans ID]) as Max_Trans_ID

Resident Customer

Group By [Customer ID], [Tran Date];

View solution in original post

4 Replies
Not applicable
Author

use in you dimension customer and on expression use max(tran date).

Not applicable
Author

Thank Sliva,

I need Max(Trans ID)  and Max(Trans Date) of that customer

sunny_talwar
MVP
MVP

Like this?

Customer:

LOAD [Customer ID],

    [Tran Date],

    [Trans ID]

FROM

[Book1.xlsx]

(ooxml, embedded labels, table is Sheet1);

Customer_G:

LOAD [Customer ID],

  Max(Date([Tran Date])) as Max_Trans_Date,

  MaxString([Trans ID]) as Max_Trans_ID

Resident Customer

Group By [Customer ID], [Tran Date];

Not applicable
Author

use maxstring(Trans ID)