Forum Discussion
Merge Rows
- Anonymous7 years ago
Hey Anonymous
I'm making some presumptions here, so if I am way off the mark I apologize.
I think you want to use 'transpose.' I use this a lot more in Excel, but it does the same thing in power query. Here is what my data looked like when I started (I'm modeling mine based on how I understood your description). I have columns for my employees. I then have to use headers as first row. After doing that, I can use transpose to use the columns as rows.
The below is just a screenshot of me demoting the headers.
At this point, I can click 'transpose' & the data should switch. The last step would then be to promote my headers & I think I have the data where you need it to be. The 'transpose' btn is directly below the 'transform' tab.
Hope this helps!
Perhaps, I can think of several possibilities. Can you provide sample/example data in text? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.
Do you have an employee ID as part of the data, I presume? Any other fields/columns?
thanks for the link to the article! that helps for sure.
so I have an event table that has an EventID (PK) | EmployeeID (FK) | CompanyID (FK) | WorkDate | TimeStamp | EventTypeCode fields. has a few more but not relevant to what I am trying to do. So the Data would look something like
EventID (PK) | EmployeeID (FK) | CompanyID (FK) | WorkDate | TimeStamp | EventTypeCode (FK) | SupervisorID (FK) | LateFlag
1 | 1234 | ABC123 | 03/12/2019 | 08:00:00 | 1 | 5678 | 0
2 | 1234 | ABC123 | 03/12/2019 | 12:00:00 | 2 | 5678 | 0
3 | 1234 | ABC123 | 03/12/2019 | 13:15:00 | 3 | 5678 | 1
4 | 1234 | ABC123 | 03/12/2019 | 17:00:00 | 4 | 5678 | 0
Where EventTypeCode 1, 2, 3, 4 = StartShift, StartBreak, EndBreak, EndShift respectively.
the Entity relationships are as follows:
EventTable *:1 EventTypeTable
EventTable *:1 EmployeeTable
EventTable *:1 SubsidiaryTable
The end result I'm trying to get to is to be able to flag an alert for the supervisor if an employee forgets to punch out at the end of the day or if they are late (using LateEntryFlag) via email. I was planning on Using Microsoft Flow for the email portion but need to capture the alert someway in power BI to act as the trigger for the flow.