Unpivot
Say my raw dataset looks like this:
And I would like to unpivot any column that has a month name is it, so in this example, it's 'Jan 2024 Total Pts Earned'
and 'Jan 2024 Pts Redeemed
', and the dataset would look like this (add a date column, total pts earned and total pts redeemed column):
How can I do this with Magic ETL? I've tried the 'Unpivot' Tile but you cannot add both 'Total pts earned' and 'total pts redeemed' along with the date column.
Answers
-
Hello @verytiredgirl,
You can do it in several steps. Here is the example data:
First, make Dynamic unpivot:
Split the unpivoted column into two columns: one for dates and one for types:
Change the format of the 'Date' column into Date with the Alter Columns tile:
And finally, pivot the 'Type' column:
Here is the result:
I hope this answers your question ;)
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
2 -
Thank you, it worked!
1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 98 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 714 Beast Mode
- 51 App Studio
- 39 Variables
- 669 Automate
- 170 Apps
- 447 APIs & Domo Developer
- 45 Workflows
- 7 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 116 Manage
- 113 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 104 Community Announcements
- 4.8K Archive