Break out rows depending on columns having a value
Hi, I have a dataset that looks like this:
Name ID1 ID2 ID3 ID4 A 1 2 3 4 B 5 6 7 C 8 9 D 10
I want to break out these Names by the different IDs, like so:
Name ID A 1 A 2 A 3 A 4 B 5 B 6 B 7 C 8 C 9 D 10
How would I approach this in Magic ETL? Thank you.
Best Answer
-
You would use the pivot/unpivot tile in Magic ETL:
There are examples in the KB article that walk through exactly what you are trying to do. Let me know if you get stuck!If I solved your problem, please select "yes" above
3
Answers
-
You would use the pivot/unpivot tile in Magic ETL:
There are examples in the KB article that walk through exactly what you are trying to do. Let me know if you get stuck!If I solved your problem, please select "yes" above
3 -
This is exactly what I needed, I always forget about this tile. Thank you!
0 -
@jrtomici the answer provided by @ColemenWilson is the correct one, and I kindly ask that you please select his answer as the best response. I just wanted to provide you with a quick breakdown of how to achieve it.
Example Data
You'll use the dynamic unpivot tile, selecting "Name" to not be pivoted and then assigning whatever name you want to give your column name and column value columns. In this case I choose ID and Value
Then you can filter to where Value is not null to remove rows where there wasn't a value for that ID
Lastly, you can select the columns you desire in your output. In this case, I matched the output you showed in your post.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive