How do I insert a blank line below each row of known data and have the value equal to the previous row and the GL Account equal to a fixed value?
For example,
Existing data
GL Account | Amount |
69012000 | 255.47 |
69014000 | 102.72 |
69031000 | 358.19 |
69031000 | 38.83 |
Target data
GL Account | Amount |
69012000 | 255.47 |
24508210 | 255.47 |
69014000 | 102.72 |
24508210 | 102.72 |
69031000 | 358.19 |
24508210 | 358.19 |
69031000 | 38.83 |
24508210 | 38.83 |
Solved! Go to Solution.
Hey @phoebe_90 You can use this solved solution to insert blank rows between your data - https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-To-Insert-Blank-Rows-in-Be...
Then you will have to use Formula tool to change null values in GL account to 24508210 - - IF ISNULL(GL account) THEN '24508210' ELSE GL account ENDIF.
For Amount, you will have to use Multi row formula - IF ISNULL(AMOUNT) THEN ROW-1: AMOUNT ELSE AMOUNT ENDIF.
Hope this helps.
An alternative, simple solution that meets the stated requirements:
Depending on need and variability, modifications could be made to make it more intuitive to set the fixed GL Account value, but this should suffice as a starting point.
The point of this workflow is to minimize redundant work. Since all of the amounts already exist and we only need to duplicate the record with an updated field, we can perform a self-Union, using a Formula Tool to update the GL Account Field. Everything else in the workflow is for formatting.
Hope this helps and Happy Solving!