Forum Discussion

CMSGuy's avatar
CMSGuy
Helper III
3 years ago

Help flattening data

I know somehow this data needs a pivot, but I just need some guidance as I do not have much experience with pivoting data.  This is a sample of data coming into a table in our Power BI report.  It has been filtered by an employee, year, and month.  What I need is a table that has only the DATE as a record and then columns for Task Number and Instance Entered.  

 

So for example, in this data listed, there would be ONE record for each data:  4/3/2023, Task 1, 1; 4/4/2023 Task 1, 1, Task 2, 3...

 

EmpIDDateRecordedTaskNumberInstancesSubmitted
2644/3/2023Task 11
2644/4/2023Task 11
2644/4/2023Task 23
2644/6/2023Task 11
2644/10/2023Task 11
2644/11/2023Task 11
2644/12/2023Task 11
2644/13/2023Task 11
2644/17/2023Task 27
2644/18/2023Task 21
2644/18/2023Task 26
2644/19/2023Task 11
2644/19/2023Task 24
2644/20/2023Task 11
2644/20/2023Task 22
2644/24/2023Task 11
2644/24/2023Task 22
2644/25/2023Task 11
2644/25/2023Task 23
2644/26/2023Task 11
2644/26/2023Task 25
2644/27/2023Task 21

 

Thanks for the help.  I really appreciate it.

2 Replies

  • You can use the Matrix visual. Put the date in the columns and the task in the rows, then insidents in values

    • CMSGuy's avatar
      CMSGuy
      Helper III

      Yes tried that, but there are two other tables that need to relate to this table.  There is a main Employee Table where the EmpID comes from.  Then a Details table (the one I need to flatten) that is related by the EmpID.  Then I have an Hours Worked table (related by that EmpID and date) and a Ratings table (related by the same Emp ID and date).  When I include hours or ratings, there are way too many columns (hours and ratings for each Task).