Aug 18 2021 03:20 AM
Aug 18 2021 03:20 AM
What is the smartest way to transfer data from one spreadsheet to another but not take the whole information from one? I have one spreadsheet with information and need to transfer only some information to another one spreadsheet. Hope this makes sense. Thanks
Aug 18 2021 04:04 AM
@scaffnull That's a broad question. "Transfer only some information to another spreadsheet". Would that be a particular range, or groups of cells spread out all over the place? Show us what you are dealing with and I'm sure you'll get help.
Aug 18 2021 04:11 AM
Aug 18 2021 04:32 AM
@scaffnull You could just create one file/table (cut and paste) with all weekly hours per job number and then summarize the lot with a pivot table. Or, if you want to avoid the manual copying and pasting, look into PowerQuery (PQ). Set up the correct routine(s) once and just add weekly data files to a particular folder on your system and refresh the query(ies). It is as easy as it sounds, BUT you need to learn some PQ basics first.
But, to be sure that these are indeed the smartest ways, please upload some sample data. Replace any confidential information with something that is made up.
Aug 29 2021 03:18 AM
@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.
Aug 29 2021 07:58 AMSolution
@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.
Aug 29 2021 08:42 AM
@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
Sep 03 2021 09:02 AM
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
Sep 05 2021 11:34 PM
@Yea_So So then when I have 2 versions of sheet1, do I delete duplicates? Or how will I proceed to blend the data together with sheet2? Thanks for your help.
Sep 06 2021 10:51 AM
Never delete any business records unless you are absolutely sure that you do not need them anymore and one can only be sure of that is if when time passes maybe 15-30years as a general rule.
1. you combine both workbooks dynamically using power query
2. then you can decide which one you,re going to try first by formulas or by parameter queries
those are the two roads you can pick, choose one
Sep 07 2021 05:16 AM
@Yea_So Would always save a spare copy
Sep 07 2021 11:31 AM
DAX is good for creating reports, but you have to have all dataset present to do calculations that is why you do not delete any of your dataset