Make some example datasets and post their CSVs here (from the dataset editor popup) in "preformatted text" code blocks. Then I can show you exactly what you need. But note, nowadays I do this exclusively in expressions using my (free) Integration Toolkit module: