Datasets

Datasets

Help Pivoting Data

Domo Employee

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

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answer

  • Coach
    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 Site faviconMySQL pivot table query with dynamic columns

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • Coach
    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 Site faviconMySQL pivot table query with dynamic columns

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • 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.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In