SOLVED
Multi Row and Multi Field
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
VJ_88
8 - Asteroid
2 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I have to design a workflow to prepare my excel in desired format
Transformation needed
- There are 102 columns if ` is found anywhere in any column any row replace with blank
- similarly -` should be replace by blank
- Now a more complex part for me as still trying to figure out
- Column Name ending with _NF and _DF cannot be blank all blank values to be replaced by -1 and _DF with 1900
- There could be multiple column whose column name could end _DF
- How can we apply formula on all such even if a new column is added in future ending with _NF or _DF
Solved! Go to Solution.
Labels:
- Labels:
- Developer
- Developer Tools
- Iterative Macro
1 REPLY 1
15 - Aurora
2 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@VJ_88 you can do all of this with the multi-field formula tool (or 2 tools).
The first tool would use
REPLACE(REPLACE([_currentfield_],'-`',''),'`','')
with all fields (including dynamic or unknown fields) selected.
For the complex part, again tick all fields (including dynamic or unknown fields) and then use the following formula
IF IsEmpty([_currentfield_]) AND Endswith([_currentfieldname_],'_DF') THEN 1900
ELSEIF IsEmpty([_currentfield_]) AND Endswith([_currentfieldname_],'_NF') THEN -1
ELSE [_currentfield_]
ENDIF
If these fields are strings, then you may need to do '1900' and '-1' rather than the unquoted versions I put above.
I'm away from Alteryx atm, so test that formula out, but I think it should work.
Ollie
