Discussion Board for collaboration on QlikView Scripting.
Hi Qlik Masters,
i have a table that show target based on date, example below :
Based on above data, i don't have END_DATE and user expect me to set end_date from next start_date, if next start_date null then today.
Show the result will be like below :
Based on above example, is there any solution to do that in load script?
Many thank you,
Go to Solution.
Just a small correction in Jonathan's code.
Data: LOAD BRANCH, TARGET, START_DATE FROM Source; Final: Load *, If(BRANCH=Previous(BRANCH),Previous(START_DATE)-1,Today()) as END_DATE Resident Data ORDER BY BRANCH, START_DATE DESC; DROP Table Data;
View solution in original post
Load like this:
If(Previous(BRANCH) = BRANCH,
) as END_DATE
ORDER BY BRANCH, START_DATE DESC;
Dear Jonathan & Tamil,
Thank you for the best effort