Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Repeating dates based on row criteria

Hi all,

    Hoping someone can help me. So basically I have this survey dataset (see sample below). The Walk Date column doesn't actually exists in the original dataset, however it exists as one of the values in the Step Answer column. The Step Answer column contains multiple types of values (mostly text and dates). 

 

     What I want to do is extract the date from the Step Answer column which is pretty easy, however, here is the tricky part now. I want to repeat that Walk Date for each of the unique Task ID.

 

 

Example: if Store 10 has a task ID of a39b-036c1df3a4f1. The Walk Date was 10/14/2020. I want to repeat that walk date for each row that contains that same task ID. See the column in red.  Hope someone can help out as I have been stuck on this for 45 minutes. Thanks! 

 

 

Task IDWalk Date (What I extracted)Walk Date ( What I want)LocationQuestion Step Answer
a39b-036c1df3a4f110/14/202010/14/2020101 - When was this location walked?10/14/2020
a39b-036c1df3a4f1Null10/14/2020102 - Was all the schedules posted on time?No
aaa8-98f60e23b0b110/20/2020 10/20/2020151 - When was this location walked?10/20/2020
aaa8-98f60e23b0b1Null 10/20/2020152 - Was all the schedules posted on time?Yes
  • Can you just right-click on the Walk Date columnj Anonymous , select Fill from the right-click menu, then Down from the submenu?

    It will fill the date down filling all nulls until it hits another date, then it stops and repeats the process.

4 Replies

  • edhans's avatar
    edhans
    Community Champion

    Can you just right-click on the Walk Date columnj Anonymous , select Fill from the right-click menu, then Down from the submenu?

    It will fill the date down filling all nulls until it hits another date, then it stops and repeats the process.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi edhans,

      Unfortunately, some locations have more than the 2 questions. Thanks for the suggestion. So when I do fill up/fill down (or both), it would sometimes put the incorrect date for at the start of the new task ID. This is my dilemma.  See the screenshot below. Any other suggestions?

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi edhans,

           I was able to find a solution. What I did was filtered the question Walk Date which would remove the date discrepancy between the unique Task ID when I do the fill down. Thanks for your help!

  • edhans's avatar
    edhans
    Community Champion

    Great Anonymous - glad to be of assistance!