Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAHere's my solution. Not as dynamic as it probably could be, but it gets to the output file.
To preserve the order, feel options:
1: could do with union separate workflows, but it will have more duplication on some tools.
2: use select records, but it only returns in the ascending order, so need to use multiple to union the results
3: Create dummy ID field along the way
As the table structure is not standard format with subtotal/total in them, didn't bother to change the order here.