Forum Discussion

griffinst's avatar
griffinst
Helper I
6 months ago
Solved

Combine columns into 1

I have a dataset.  I need to somehow combine the "GIC" into a column and the "PE" into another column so I can drop them into slicers for filtering.  I was able to transpose, but it doesn't allow me ...
  • wardy912's avatar
    6 months ago

    Hi griffinst 

     

     You need to unpivot here rather than transpose:

     

    In Power Query, select all of the columns that you want to keep fixed, then select 'unpivot other columns'

     

    Select the 'Attribute' column, then on the home tab select 'Split Column by Delimiter'

     

     

    Then split by colon, left-most delimiter

     

    You get 2 new columns, call Attribute.1 "Category" and Attribute.2 "Condition".

    Close and apply.

     

    Now you can add a visual level filter of Value=1 (or filter out 0s in power query) and a category slicer to display your results!

     

     

     

    --------------------------------

    I hope this helps, please give kudos and mark as solved if it does!

     

    Connect with me on LinkedIn.

    Subscribe to my YouTube channel for Fabric/Power Platform related content!

  • griffinst's avatar
    6 months ago

    GeraldGEmerick.  I think that might work but I think I need a merge rather then an append.  The split column worked but I'm not getting the results I need.  Pretty sure I need Columns of "GIC" and "PE" to filter the data correctly.  So then a user can select a GIC filter and a PE filter and both will filter the dataset down to the people who meet both criteria.

     

    see below screenshot... I need the "category" values to be seperate columns with values of "Cat_Detail" then the cooresponding "Value".   ie...   "Gap in Care" column and "Gap in Care Value" column.  and same for "uncontrolled.., and preventable...  Thanks for any help you can provide.