Creating a new column

Liliana βšͺ️

Hi all- I am having some issue separating a column.

My data set has the payors in the same column and I need to create a separate column for each payor. Can someone please help ?

Thank you


  • GrantSmith
    GrantSmith Indiana πŸ”΄

    Hi @Liliana

    have you tried using a pivot table and pivoting on your payor type field if you’re just wanting to display it in a table?

    If you’re wanting to do it in your data set you can utilize a pivot tile in magic ETL

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟀

    You could use a pivot table and put invoice payor type as a column and that would create a column for each.

    You could also use Magic ETL to pivot the data using the Uncollapse Columns tile. See this KB article:

    You could also create multiple beast mode, 3 for each payor type to do it.

    Using the pivot table card would be the easiest.

  • Liliana
    Liliana βšͺ️

    Thanks Grant and Mark, it worked. Appreciate your help and quick response.

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟀

    @Liliana i strongly recommend against using Magic to uncollapse the data. if a new payer shows up your dataaflow will exclude them, b/c you haven't enumerated them.

    Pivot Table is a safe solution but becomes unwieldy as you get more and more payers. What's the question you're trying to answer?

  • Liliana
    Liliana βšͺ️

    Thanks, Jae I need to track payment by insurance and patients. I created the ETL , unpivot the data then created a table in SQL to bring some information over that I was not able to get in ETL. It worked with the unpivot as Grant and Mark recommended. However, now I am trying to create a total paid column (patient paid plus insurance paid) and it is giving me a cumulative amount. Not the correct balance per row.

    This is how my columns look now.

    Thank you!