Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to copy specific value with conditions?

Shaopingfu
7 - Meteor

I have a table with 2 parts data- Date/Text/Value 1 and 2

How can I use tools to copy Value1 to Value2 for rows where the Date2 and Date1 in one line have same month-year and leave the other cells of Value2 empty? 

 

Date1Text1Value1Date2Text2value2  ( to copy value1)
2023/2/4abc1232023/4/4nrf 
2023/3/8cdf2222023/5/8ekrhkjr 
2023/4/91bh2342023/6/9kkl 
2023/5/3igi;l7802023/6/3jkjkhfu 
2023/5/15njfi88972023/7/15dkw 
2023/7/3khfdljg12332023/7/25pwerkhfdljg
2023/7/9ggre24232023/8/3fjh 
2023/8/5vfff6872023/8/12uevfff
2023/9/1jhrt8782023/8/22mcd 
2 REPLIES 2
flying008
13 - Pulsar

Hi, @Shaopingfu 

 

FYI.

 

1- From [Text1] :

 

IIF(DateTimeParse([Date1],'%Y-%m') = DateTimeParse([Date2],'%Y-%m'), [Text1], Null())

 

 

2- From [Value1] :

IIF(DateTimeParse([Date1],'%Y-%m') = DateTimeParse([Date2],'%Y-%m'), [Value1], Null())

 

录制_2023_09_05_14_05_09_167.gif

 

录制_2023_09_05_14_25_28_840.gif

 

binuacs
19 - Altair

@Shaopingfu One way of doing this

image.png

Labels