Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Highlighted
amit_shetty78
Contributor II

Convert Rows to Columns in Load Script with history changes

Hi All,

I have a dataset where slowly changing data is stored in the following format with key value pairs stored in rows:

StartDateEndDateIDDimensionValue
02/11/201819/11/2018FTID15NameName1
02/11/2018NULLFTID15StatusActive
02/11/2018NULLFTID15GroupGroup1
02/11/2018NULLFTID15Sub GroupSUB Group1
20/11/201819/12/2018FTID15NameName2
20/12/201823/01/2019FTID15NameName3
24/01/201920/02/2019FTID15NameName4
21/02/201927/02/2019FTID15NameName5
28/02/2019NULLFTID15Sub GroupSUB Group2
02/11/201819/11/2018FTID12NameNamex2
02/11/2018NULLFTID12StatusActive
02/11/2018NULLFTID12GroupGroup2
02/11/2018NULLFTID12Sub GroupSUB Group13

 

I need some help to transform this data in qlik to be stored in the following format:

StartDateEndDateIDNameStatusGroupSub Group
02/11/201819/11/2018FTID15Name1ActiveGroup1SUB Group1
20/11/201819/12/2018FTID15Name2ActiveGroup1SUB Group1
20/12/201823/01/2019FTID15Name3ActiveGroup1SUB Group1
24/01/201920/02/2019FTID15Name4ActiveGroup1SUB Group1
21/02/201927/02/2019FTID15Name5ActiveGroup1SUB Group1
28/02/2019NULLFTID15Name5ActiveGroup1SUB Group2
02/11/2018NULLFTID12Namex2ActiveGroup2SUB Group13

 

Here the dimension value are not just limited to the 4 mentioned in the example. This can vary and needs to be loaded automatically.

Appreciate any help with this.

 

Thanks.