Forum Discussion
Power Query: Get File Name
skhemka Please see the sample workbook. You will have to do the following steps:
1. Save your mark workbooks as .csv files in a specific folder containing only those mark workbooks that you want to combine
2. Save my sample workbook as your workbook then Open Advanced Query Editor and change the folder path in "Source" line to your folder path (note: this is folder path only, not file path)
- skhemkaJun 01, 2020Copper Contributor
hynguyen Thank you very much for your reply.
But I do not want to combine the other columns. I want to keep Quiz, Assignment, Test and Exam all in separate columns.
I would appreciate your help, please.
Thank you.
- hynguyenJun 02, 2020Iron Contributor
skhemka Can you please show what your desired output should look like by manually typing in a sample data with all needed columns? It seems that you want to have a layout like: Source, Student ID, Exam, Quiz, Test, Assignment.
However, like SergeiBaklan mentioned, it is difficult for us to imagine how to treat the case where the same Student ID attends both courses? How do you want to show those cases?
- SergeiBaklanJun 01, 2020Diamond Contributor
With merging of two queries, I guess FullOuter join to have all records from both, it's not clear where to add filenames - in one record it could be both name of first table file, as well as second one.