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: 
gaurav2017
Creator II
Creator II

Getting all active records merged in 1 record

‌Is this possible what i want to achieve shown in this image.

in the image attached, the data shown above is the type of data i have in the table, and the data shown below in the image is what is requirement.

I thought it might be possible using the loop, but not able to get the correct output using loop.

3 Replies
Gysbert_Wassenaar

Please post a source table and the result table you expect. An excel file with examples for both tables (including data) will be fine.


talk is cheap, supply exceeds demand
maxgro
MVP
MVP

From your image it seems you need a (pseudocode)

load

     [Employee Id],

     max(Start),

     max (End),

     concat (distinct Type, ',')

resident yourtable

group by [Employee Id];

Not applicable

You can use the group by function to get the latest values.

LOAD

     EmployeeID,

     Max(Start) AS Start,

     Max(End) AS End,

     Concat(Distinct Type , ',') AS Type

From Source

Group By

     EmployeeID

;