cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help on Formula

Pinky
Meteoroid

My Data is shown below. I need to meet two conditions which are

1.For each number the first group of the date should get updated in to updated Date field.

2.Whenever group(AA) is changed to new group(AB) for each number, the one before row date should get updated in to updated date field like shown below. Please help on this?

 

NumberDateGroupUpdated date
1111/2/2017AA1/2/2017
1111/12/2017AA 
1111/3/2017AB1/12/2017
22211/2/2017BB11/2/2017
22211/3/2017BB 
22211/5/2017BD 
22212/3/2017BE11/3/2017
3333/4/2017CC3/4/2017
3333/5/2017CC 
3334/4/2017CD3/5/2017
LordNeilLord
Alteryx Certified Partner

Hey @Pinky

 

Try this formula in the Multirow formula tool....grouped by Number:

 

If IsNull([Row-1:Number]) then [Date]
Elseif [Group] !=[Row-1:Group] Then [Row-1:Date]
Else Null()
Endif

DSmR.PNG

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Pinky
Meteoroid

Thanks for the above reply and it helped me.I have one more question. I have two dates in format like YYYY-MM-DD hh:mm:ss. I need to subtract the two dates which in format YYYY-MM-DD hh:mm:ss. Can you please help on this? Thank you!

LordNeilLord
Alteryx Certified Partner

Hey @Pinky

 

Have a look at this page! This may be able to help

 

https://help.alteryx.com/9.5/Reference/DateTimeFunctions.htm