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

Keeping Max values only

Hi all,

I am new to Qlikview and I need help extracting only max values corresponding to OriginalICERecordID(ReadyPublish) in ICERecordID(ReadyPublish) keeping all the other columns and delete the rows which do not contains max value. Length of these field is 15 char. This data is getting imported from a CSV file.

This is 1 example, file contain thousand of such entries.

Record.PNG

Thanks and regards

Abhijit

1 Solution

Accepted Solutions
sunny_talwar

Can you try MaxString instead of Max

Right join (Omega)

Load [OriginalICERecordID(ReadyPublish)],

MaxString([ICERecordID(ReadyPublish)]) as [ICERecordID(ReadyPublish)]

Resident Omega

Group by [OriginalICERecordID(ReadyPublish)];

View solution in original post

7 Replies
sunny_talwar

May be do a right join like this

Right Join (FactTable)

LOAD [OriginalICERecordID(ReadyPublish)],

     Max([ICERecordID(ReadyPublish)]) as [ICERecordID(ReadyPublish)]

Resident FactTable

Group By [OriginalICERecordID(ReadyPublish)];

shiveshsingh
Master
Master

Get the max value in one table and then do a right join with original one.

It will give the desired result.

If you can share sample data, it would help

Anonymous
Not applicable
Author

Hi stalwar1

Thank you for reply, however after executing this code, I am getting the following output.

QOutput.PNG

Regards

Abhijit

sunny_talwar

Can you post the exact script you tried?

Anonymous
Not applicable
Author

Table:

LOAD *

FROM

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Right join (Table)

Load (OriginalRecID),

Max(RecID) as RecID

Resident Table

Group by OriginalRecID;

sunny_talwar

Can you try MaxString instead of Max

Right join (Omega)

Load [OriginalICERecordID(ReadyPublish)],

MaxString([ICERecordID(ReadyPublish)]) as [ICERecordID(ReadyPublish)]

Resident Omega

Group by [OriginalICERecordID(ReadyPublish)];

Anonymous
Not applicable
Author

Hi stalwar1

You are genius.

Thanks a ton, Mate!