Hello,
I have the following data problem, and hoping to get some advice.
I have figured out how to do this, but only for a dataset where there is 1 header. I have been unable to figure out how to do it using multiple headers. I was thinking of some kind of batch macro, but couldn't figure out how to group the data to pass it to the batch macro.
Any guidance, thoughts, or examples would be greatly appreciated.
Mike
¡Resuelto! Ir a solución.
Hi @mdorio
Can you provide a sample data set with multiple headers and what data you are looking to extract?
Hi @mdorio
If you find yourself with multiple header rows you're probably parsing a report that's meant for human consumption and looks something like this
You can use this technique to handle these kinds of reports where columns contain interspersed header and/or grouping information
Read in the report as-is and make sure that the 1st row is read a data and not as a header. Then use a couple of Multi-row tools to first create groups for each transaction and then number the rows within each group. Use a filter to pull out the rows that represent the start of each transaction and have the date information you need. Join these rows to the rest of the rows on transaction ID, to append the Date from the transaction line to each of the rows. Then use a formula tool to replace the dates if they're missing.
At this point you have the dates filled in. If you want to rebuild the original report with the new dates, use a technique similar to the top container. If you want to continue processing the data and want the fields properly labelled and typed, look at the bottom container that shows one way you could accomplish this.
Dan
Thank you so much Dan! This looks exactly what I am trying to do. Really appreciate it!
Mike