Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Find and Replace OR Multi Row Formula?

MeggyBrink
5 - Atom

 

Hello
I am hoping to get some guidance.
I have a data set with a single column that combines Year/Month (data type: V_String). See Figure 1 below.


I need to split out the Year/Month into 2 columns - Year and Month.
This is simple enough with the text to columns tool.
Where it gets tricky is trying to populate the rows after the first row.
I have tried using the multi-row tool, but I get stuck

 

 

 

Figure 1.

Row NumberMonthRegionDATA
12022/JanACT - Metro0
2 ACT - Rural0
3 New South Wales - Metro0
4 New South Wales - Rural0
5 Northern Territory - Metro0
6 Northern Territory - Rural0
7 Queensland - Metro0
8 Queensland - Rural0
9 South Australia - Metro0
10 South Australia - Rural0
11 Tasmania - Metro0
12 Tasmania - Rural0
13 Victoria - Metro0
14 Victoria - Rural0
15 Western Australia - Metro0

 

Step 1.

MeggyBrink_1-1660701861045.png


Its trying to configure the multi-row tool with the correct condition function that is where I am struggling

MeggyBrink_2-1660701961909.png


I think the problem is coming in with my Expression:
IF IsNull([Year/Month])
then [Row-1:Month]
else [Month]
endif

 

Please let me know if anyone has a solve for this?

2 REPLIES 2
apathetichell
18 - Pollux

you want to bring over the field from [Row-1:Month Name] (your new field - not [Month] you also may need to set up scenarios for what happens for the first and last record.

SPetrie
12 - Quasar

Your formula is telling it to use [Row-1:Month], but that would also be null, you want it to be [Row-1:Month Name]

 

I would also suggest an alternative of using the multirow tool to bring down the Year/Month column instead and then splitting to columns so you are not having to do multi-rows on both columns (assuming you need both columns).

 IF IsNull([Year/Month]) then [Row-1:Year/Month] else [Year/Month] endif

 

Labels