Hi,
I have a problem to create pivot table with multiple headers in power query,
here is my base data:
base data.JPG
And, here is my expected output:
expected output.JPG
How can i generate the expected output? Thanks a lot!
Hi,
I have a problem to create pivot table with multiple headers in power query,
here is my base data:
base data.JPG
And, here is my expected output:
expected output.JPG
How can i generate the expected output? Thanks a lot!
Welcome to the forum.
There are instructions at the top of the page explaining how to attach your sample workbook.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Attached please find the sample test data.
Hope someone may help me.
Thanks a lot.
Perhaps someone can simplify this:
1. Add two columns (J:K) to the source data to record times as text using: =IF(ISNUMBER([@[Late In]]),TEXT([@[Late In]],"hh:mm:ss"),[@[Late In]])
Note that the column headers for columns J:K have an extra space at the end to distinguish them from columns H:I
2. Use the following Power Query advanced editor code:3. Select Close & Load to: then select Connection only and Add to Data ModelPlease Login or Register to view this content.
4. In the Data Model add the following measure: Value Results:=CONCATENATEX(Table1,[Value])
Note that the table produced by Power Query is called Table1 and that the default name for the column is Value. Either or both could be changed.
Note that the measure name, Value Results, could also be changed.
5. Produce a pivot table from the Data Model using Call in Sign in the Rows area, Date and Attribute (Shift, Late In, Early Out) in the Columns area and the measure Value Results in the Values area.
Note that the Shift column may need to be manually moved ahead of Late In and Early Out. Also Late In moved in front of Early Out. When this is done for one date the others should change automatically.
Here is a link to an article that may help: https://sfmagazine.com/post-entry/ju...a-pivot-table/
Let us know if you have any questions.
Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks