Forum Discussion
Transfer and changing data with two different Excel sheets
- Aug 29, 2021
scaffnull Combined both sheets into one to make it easier to follow through the entire process. The attached file contains a "dirty" PQ solution that need optimizing. Bur just to be sure that the Invoice table is something you had in mind. Perhaps it enables you to continue with what you developed earlier. If not, come back here.
Riny_van_Eekelen Been trying this out for a week now with any success. Both trying to learn PowerQuery and testing it in Power BI. But I attached two files.
So to explain, I get Sheet1 with updated data every week, and Sheet2 is where I want to add/transfer/delete the data based on Sheet1. So, for the second row in Sheet1 the "WorkNr" matches a "WorkNr" in Sheet2, then I want to add the Hours Worked on to Sheet2, since the "WorkNr" matched. And that goes for row 5,8,11(from Sheet1) as well since the "WorkNr" match. But for row 14 there is a new WorkNr that doesn't match any WorkNr in Sheet2. I then want to add the new WorkNr on to Sheet2, with WorkNr, Hours Worked, Company, Place (the formatting I get from Sheet1 is not ideal, but I found a way in Power Query to extract that into a new column for Company, and Place). Then for row 14, and 23 (in Sheet1) they have matches with WorkNr,(twice job on that in one week) so all I want to do there is to add the total Work Hours to Sheet2. So in the end, if WorkNr match, only add hours, if WorkNr do not match, add a new row in Sheet2 with all the criteria. So when automated, total work hours with matching WorkNr adds up to the total hours from Sheet1 (this case 272).
Hope this makes some sense since I'm fairly new to the PowerQuery, PowerBI and Excel world.
Thanks!
scaffnull Combined both sheets into one to make it easier to follow through the entire process. The attached file contains a "dirty" PQ solution that need optimizing. Bur just to be sure that the Invoice table is something you had in mind. Perhaps it enables you to continue with what you developed earlier. If not, come back here.
- Desmania_Design2365Mar 05, 2024Copper Contributor
what data transfer one sheet to another url sheet using office script?
- scaffnullAug 29, 2021Brass Contributor
Riny_van_Eekelen I truly appreciate your help. But to mention, the sheet2 originally consist of 2000 rows and sheet1 with around 300 rows. Therefore I believe it would be a messy job to go that route. And since I'm fairly beginner I need to learn more formulas using DAX, working with Power BI, so the goal is to automate the process where sheet1 gets applied to all the rules and formulas and after blend in with sheet2. But again, thanks for your help! And I'll get to work and learn the whole concept and trix to fix this 🙂
- Yea_SoSep 03, 2021Bronze Contributor
you need to provide two versions of sheet1.xls, the first version that have original worknr with the existing worknr in sheet2 and the 2nd version that have worknr that does not exist in the first version (in order to test) and 1 version of sheet 2 or you can do the testing yourself since you already have the dataset