Forum Discussion

migueljoa's avatar
migueljoa
Frequent Visitor
5 years ago
Solved

Help with this Powerquery Puzzle!

I have a table with the following columns:

[Date] [BalTerm1] [BalTerm2] [BalTerm3] [Rate1] [Rate2] [Rate3]

 

I want it to look like this:

[Date] [Term] [Balance] [Rate]

             1          

             2

             3

  • Solved it!

     

    1. Unpivot Term Columns
    2. Unpivot Rate Columns
    3. The result will be a matrix that repeats all combinations of Term and Rate
    4. Replace text to match Rate attribute to Term Attribute
    5. Create a column to find attributes that are the same
    6. Remove rows that are not a match
    7. Rename columns properly and remove the new row created.

     

1 Reply

  • migueljoa's avatar
    migueljoa
    Frequent Visitor

    Solved it!

     

    1. Unpivot Term Columns
    2. Unpivot Rate Columns
    3. The result will be a matrix that repeats all combinations of Term and Rate
    4. Replace text to match Rate attribute to Term Attribute
    5. Create a column to find attributes that are the same
    6. Remove rows that are not a match
    7. Rename columns properly and remove the new row created.