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 |
Solved! Go to Solution.
Try:
If [row-1:Sector] IN("Treasury","Corporate-Investment Grade","Government Related","Corporate-High Yield","Securitized")
THEN [row-1:sector]
ELSE [Sector]
ENDIF
Ollie
@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
Thanks, I wrote the same expression only instead of [row-1:Sector] i wrote (Sector). I appreciate your help.
User | Count |
---|---|
17 | |
14 | |
10 | |
6 | |
6 |