Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello friends,
i hope you can help me, i have the following question :
How can I move a list one row up?
I have the Origin Column : "myTimeStamp" and would like to create a second column but shift it up by one row.
I want to calculate the time differences
I hope you can help me.
If you don't have a script solution, I would also be happy with a nonscript solution.
The solution should look like this:
Thanks !
Then all you need to do is to sort first by username and then timestamp desc. and add an if statement to the peek function like this
If(username = previous(username), peek('TimeStamp'), 0) as Next_TimeStamp
You can sort the table in the script in descending order and then use Peek() or Previous function to pull the value from the previous row
like
Load myTimeStamp,
Peek(myTimeStamp,-1) ?
Yup, something along those lines... but make sure to order the timestamp in descending order. Also, do you have another dimension which would restart this process? or do you want to stamp the next timestamp across the whole data set regardless of any other dimension?
yes i have also have the user names as a dimension.
5 users have a schedule every day.
my initial goal is, to calculate the time difference and create a schedule plan, to visually see their schedule
Then all you need to do is to sort first by username and then timestamp desc. and add an if statement to the peek function like this
If(username = previous(username), peek('TimeStamp'), 0) as Next_TimeStamp
That helps, thank you very much!