Macro/Batch Macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone,
I have 2 tables [Raw] and [Totals]. Both contain same field structure, ID and Account , but in [Raw] table, field Account is not populated. And I want to do this based on values from [Totals] table.
Based on ID field values comparison of 2 tables , I want to populate Account field in [Raw] using that sequence :
IF ID[raw]<ID[Totals]
Then
Account[Totals]=Account[Raw]
Very important is that comparison should be done always for remaining items in both tables at each loop run.
I am new in Alteryx and any idea will help me to fix this issue.
Many thanks
Best regards
Florin
- Labels:
- Batch Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Florin
Can you provide us the files used in the workflow. You need to provide us the input file for us to be able to run the workflow and see the inputs and outputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Ok. Sure. Apologize for late reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Florin
Based on your expected output and logic here another way of doing it. Check for your scenario and see whether it works.
Workflow:
1. Union raw and total.
2. Sort them descending by ID. The reason is lower ID will need to take amt from higher ID. ID[raw]<ID[Totals]
3. Using multi-row formula tool to fill out lesser ID's which are null with higher ID amt. This cover 2 logics
- Exhausting the list on each total ID
- Applying logic
IF ID[raw]<ID[Totals]
Then
Account[Totals]=Account[Raw]
4. Sorting Id on ascedning.
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Many thanks @atcodedog05 . That's fantastic !😊 Lots of thanks.
