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.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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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