Forum Discussion

Dmclellan1's avatar
Dmclellan1
Regular Visitor
2 years ago
Solved

Separating out values in power query based on same unique identifer

Hi team, In power query I have 2 columns. memberId and display Value. Here is a sample of the current data: memberID displayValue 8897 Cool 8897 Not Cool I want it to muniplulate it...
  • BA_Pete's avatar
    BA_Pete
    2 years ago

     

    Ok. So, the very simplest way to solve your exact issue is to create a column that has your new column headers in it, then pivot that column:

    // New custom column 'ColumnHeaders'
    if [displayValue] = "Cool" then "DisplayValue1"
    else "DisplayValue2"

     

    Pivot column:

    Output:

     

    Obviously this is largely dependent on how many actual DisplayValues you have per MemberID, and how frequently the values change.

     

    Pete