Alteryx Designer Desktop Discussions

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

Required help in Multi Row Formula function

anonymous008_G
8 - Asteroid

Hi,

I have below sample dataset in the alteryx and I want to achieve the result as below sector values Treasury, Corporate-Investment Grade, Corporate-High Yield and Securitized should be same below, but one below value of these sectors should appear as the respective sector names in the new column. I am trying to do it with the help of Multi Row Formula block but couldn’t be able to do it. Maybe I need my expression is not correct. Can someone please help.

Below is my sample input data.

Sector

Short

Long

Treasury

Long

Corporate-Investment Grade

Long

Corporate-High Yield

Long

Government-Related

Long

Securitized

Long

Short

Long

Long

 

Below is my expectation: -

Sector

New Coumn

Short

Short

Long

Long

Treasury

Treasury

Long

Treasury

Corporate-Investment Grade

Corporate-Investment Grade

Long

Corporate-Investment Grade

Corporate-High Yield

Corporate-High Yield

Long

Corporate-High Yield

Government-Related

Government-Related

Long

Government-Related

Securitized

Securitized

Long

Securitized

Short

Short

Long

Long

Long

Long

3 REPLIES 3
OllieClarke
15 - Aurora
15 - Aurora

Hi @anonymous008_G 

Try:

 

If [row-1:Sector] IN("Treasury","Corporate-Investment Grade","Government Related","Corporate-High Yield","Securitized")
THEN [row-1:sector]
ELSE [Sector]
ENDIF

 

Ollie

OllieClarke
15 - Aurora
15 - Aurora

@anonymous008_G 

Although it may be easier to use this formula:

 

If [row-1:Sector] NOT IN("Long","Short") THEN [row-1:Sector] ELSE [Sector] ENDIF
anonymous008_G
8 - Asteroid

Thanks, I wrote the same expression only instead of [row-1:Sector] i wrote (Sector). I appreciate your help. 

Labels