Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lazar1
Contributor III
Contributor III

Excluding field from Aggregation but keeping other fields value as is for aggregation result

Dear Qlik Developers,

I was wondering if is it possible and how, to exclude fields from aggregation in the backend, but to keep their value based on the aggregation result without creating an additional key? The example:

LOAD

ID, 

min(Creation_date) as Creation_date,

Actual_Date, //I want to keep this value for a minimal Creation date

User // I want to keep this value for a minimal Creation date

FROM abc.qvd

Group by ID;

ID Creation date Actual Date User
123 05/04/2023 10:00 04/04/2023 10:00 RPA
123 06/04/2023 10:00 11/04/2023 10:00 JOHN

 

The result should be:

ID Event Creation date Actual Date User
123 13 05/04/2023 10:00 04/04/2023 10:00 RPA

 

If I group by all other fields/dimensions I will get the same table as starting one, of course.

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Data:
LOAD ID,
Timestamp(Timestamp#([Creation date],'DD/MM/YYYY hh:mm'),'DD/MM/YYYY hh:mm') as [Creation date],
[Actual Date],
User

FROM
[https://community.qlik.com/t5/App-Development/Excluding-field-from-Aggregation-but-keeping-other-fie...]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);

Inner Join
LOAD ID,
Min([Creation date]) as [Creation date]

Resident Data

Group By ID;

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

Data:
LOAD ID,
Timestamp(Timestamp#([Creation date],'DD/MM/YYYY hh:mm'),'DD/MM/YYYY hh:mm') as [Creation date],
[Actual Date],
User

FROM
[https://community.qlik.com/t5/App-Development/Excluding-field-from-Aggregation-but-keeping-other-fie...]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);

Inner Join
LOAD ID,
Min([Creation date]) as [Creation date]

Resident Data

Group By ID;

Lazar1
Contributor III
Contributor III
Author

Thanks BrunPierre, works perfectly!

So logical and gentle solution.