How can I take multiple columns and create new rows based on the data?
We input some data through a form that is very limited in how it organizes the data. It currently looks similar to this (these are the column headers):
Date / Manager / State / District / Site / Type of Inspection / 1 - Category of Violation / 1 - Violation / 1 - Plan of Correction / 2 - (same 3 column titles) / 3 - (same) / up to 10
I'd like to be able to use the data in a way where the data resembles this...
Date/Manager/State/District/Site/Type of Inspection / 1- Category / 1 Violation / 1 Plan of Correction
Date/Manager/State/District/Site/Type of Inspection / 2- Category / 2 Violation / 2 Plan of Correction
---and so on
The thought being I can then create cards that categorize all category violations in charts with drill paths to the other data (pie chart of categories of violations). I feel like I should be able to use maybe collapse/uncollapse but my efforts have been comical at best.
Any thoughts? Thanks for the help.
Best Answer
-
Hi Jeremy,
Asuming you are doing this in magic ETL this is how you can accomplish this:
- Add a "Select Columns" box from the "Edit Columns" transforms that selects Date/Manager/State/District/Site/Type of Inspection/1 Violation/ 1 Category of Violation/1 Plan of Correction
- Do this for each set of violation data 1...10 - so the only thing that changes for each select statement is the set of 1... 10 number
- Once you have all of the select statements in place pull in an "Append Rows" transform from the "Combine Data" transforms. and append all of the select columns transforms
- Finally push this into an Output data set
This should get you what you are looking for.
Please let me know if you have any questions.
2
Answers
-
Hi Jeremy - I assume you are trying to use Magic ETL to accomplish this task?
Thanks!
1 -
Correct. I'm trying to do it all within there as I am making some other changes as well.
1 -
Hi Jeremy,
Asuming you are doing this in magic ETL this is how you can accomplish this:
- Add a "Select Columns" box from the "Edit Columns" transforms that selects Date/Manager/State/District/Site/Type of Inspection/1 Violation/ 1 Category of Violation/1 Plan of Correction
- Do this for each set of violation data 1...10 - so the only thing that changes for each select statement is the set of 1... 10 number
- Once you have all of the select statements in place pull in an "Append Rows" transform from the "Combine Data" transforms. and append all of the select columns transforms
- Finally push this into an Output data set
This should get you what you are looking for.
Please let me know if you have any questions.
2 -
I should have thought of that. That's perfect. Thanks so much for the help.
1 -
Ok - try my solution below and you should get what you are after. If you need any clarity please let me know.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive