Forum Discussion

claireDePasquie's avatar
claireDePasquie
Regular Visitor
1 year ago
Solved

Overlap tables and extract a month column from the first row.

Hi, I receive each week a table with this structure: week 1       week 2     Applications ok ko   Applications ok ko application 1 50 40   application 1 35 40 applicat...
  • ArwaAldoud's avatar
    1 year ago

    Hi claireDePasquie 

    Your table has duplicate header rows, making it difficult to analyze data properly.

    This steps in Power Query also I Attached cleaned Power Query File below you can download it:

    1. Load Data into Power Query
    2. Use First Row as Headers. your header will be (week 1 Column2 Column3 week 2 Column5 Column6)
    3. Use First Row as Headers agin. Manually Rename Columns your header will be (Applications, ok_1, ko_1, Applications_2, ok_2, ko_2)
    4. Select the columns ok_1, ko_1, ok_2, and ko_2. → Unpivot Columns.
    5. Extract Week Number. → Select the "Attribute" column.Use _ (underscore) as the delimiter → Name the new column "Week".
    6. Attribute → Name the new column "Status"
    7. Delete the duplicate "Applications" column if needed.
    8. Pivot to Separate OK and KO Columns. Select the "Status" column.→ Pivot Column. In the Values Column, select "Value".

    Cleaned Power Query File – Download Here]

     

    If this solution was helpful, please accept it as a solution or give kudos to help other community members