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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Xabinav
Creator
Creator

Help with creating SCD table

Hello
I need your help to create the second table from the first table.
I try to duplicate the dates on all subsequent records, until the next date appears and so on ...

Thanks, Adiel

 

Capture 1.PNG

Labels (2)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Like this for example:

LOAD
    Line,
    CustomerID,
    Alt(IsEnter,0) as IsEnter,
    If(Len(Trim(EnterDate))>0, EnterDate, Peek(EnterDate)) as EnterDate
FROM
     ...source table...
    ;

talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Like this for example:

LOAD
    Line,
    CustomerID,
    Alt(IsEnter,0) as IsEnter,
    If(Len(Trim(EnterDate))>0, EnterDate, Peek(EnterDate)) as EnterDate
FROM
     ...source table...
    ;

talk is cheap, supply exceeds demand
Xabinav
Creator
Creator
Author

Thanks !!!