The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

How to move data in a different row to the first row by creating a new column?

Emmm
メテオール

Dear helpers, really need your help on this! 

 

Please see attached for my input, I'm trying to create a new column (see result excel) called "new time". New time's data should = transactiondatetime for the same "businessdate", under the same "CODE", under the same "checknumber", under the same "menuitemnumber", when the "FLAG"=1. 

 

If there are more than two rows for the same item under the same CODE/checknumber/menuitemnumber, the "New time" should have data for the earliest transactiondatetime row, and leave it as empty for the later ones. 

 

I also need to calculate the date time difference between new time and transactiondatetime. 

 

Can someone please help with this? Greatly appreciated! 

2件の返信2
Qiu
21 - Polaris
21 - Polaris

@Emmm 
Here is my try. 
I should have added more details but I am on a rush for something else. Sorry.

0703-Emmm-B.png

Emmm
メテオール

Thank you so much!!! @Qiu 

ラベル
トップのソリューション投稿者