Help Pivoting Data
I have a file where I want to have each row show me the charges based on either the charge code or charge name. In this example, I used the name.
I have looked at the data online, and in the ELT. The problem with I’m seeing in the ELT is I would have list the name of every code we have in the number 3 position (shown in Yellow below). That would be almost impossible to do, as the charges or code could change each time I run it. Having more or less each time.
Is there a code or statement you an place in number 3 that will name the column the same as the code ( what I have in number 1) ?
There is an excel data table as well. I can send it to whoever ends up helping with this
Best Answer
-
You can't do a dynamic pivot with Magic ETL however you can leverage prepared statements and SQL in a MySQL dataflow to do dynamic pivoting. You can follow the SQL with something like
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Answers
-
@user14170 I don't know of a shortcut for naming the columns off hand. Do the pivoted columns need to be coded into the dataflow or are you able to use a pivot table card? If you have a large amount of charge codes you need to pivot, then having them listed as individual rows may give you more flexibility downstream.
6 -
You can't do a dynamic pivot with Magic ETL however you can leverage prepared statements and SQL in a MySQL dataflow to do dynamic pivoting. You can follow the SQL with something like
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Agreed, I've done dynamic column renaming using a Stored Proc in a MySQL dataflow - you can query the system tables to get the schema.
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