Forum Discussion

Athena_Liu's avatar
Athena_Liu
New Member
8 years ago
Solved

Prepare data in PowerBI - long table

Hi Masters,

 

I have problem with preparing my data for PowerBI, the table I have put the dates(every week) in the column names together with staff name, client name, as shown below:

 

I want to view the number of hours that oe staff worked for one client change with time. 

 


I need to convert the format to something like this in PowerBI, because i couldn't modify the original Excel tables:

 

 

Any Ideas? Really appreciate your help!!!!

Thank you!

  • Hi Athena_Liu,

     

    In Power BI desktop, get data from the Excel sheet. Then open Query Editor, promot first row as header if needed. 

     

     

    Then Fill down Staff column,

     

     

    Select columns week 1 month1 and week 2 month2 then click  Unpivot Columns. 

     

     

     

    Best Regards,
    Qiuyun Yu 

1 Reply

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi Athena_Liu,

     

    In Power BI desktop, get data from the Excel sheet. Then open Query Editor, promot first row as header if needed. 

     

     

    Then Fill down Staff column,

     

     

    Select columns week 1 month1 and week 2 month2 then click  Unpivot Columns. 

     

     

     

    Best Regards,
    Qiuyun Yu