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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Need Suggestion

Hi Friends,

I have below data with start dates available, i need to derive end date for users by looking at start date of project change. In below data, i have put end date manually which needs to be derived. Please suggest

   

UserIDUserNameProjectStart DateEnd Date
100User1Project101-02-201601-04-2016
101User2Project101-02-2016
102User3Project101-02-201601-08-2016
103User4Project101-02-2016
100User1Project201-04-201601-07-2016
100User1Project101-07-201613-12-2016
102User3Project301-08-2016
Labels (1)
6 Replies
shraddha_g
Partner - Master III
Partner - Master III

What is the logic for End date?

marcus_sommer
MVP
MVP

Within a to UserID and Project sorted load you could query and evalaute the values from the previous record per Peek() or Previous() ?‌ and evaluate your needed result appropriate.

- Marcus

Anonymous
Not applicable

Do these projects have different durations? You can estimate a time duration and try to automate the completion of the end date.

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Next available start date for User

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

There is no exact duration specified. It is only noticed when user change to next project

sasikanth
Master
Master

HI Manoj,

try this Script below

TEMP:

Load * Inline [

UserID ,UserName ,Project, StartDate

100, User1, Project1, 42371

101, User2, Project1, 42371

102, User3 ,Project1, 42371

103, User4, Project1, 42371

100, User1, Project3, 42376

100 ,  User1 ,Project2, 42373

102 ,User3 ,Project3, 42377

];

TEST:

LOAD * ,IF(UserID=Previous(UserID) and UserName=Previous(UserName)and Project<>Previous(Project) ,previous(StartDate)) as EndDate

resident TEMP ORDER BY UserID,UserName,Project desc ;

DROP Table TEMP;