Forum Discussion
Loading selective months from previous data files
- 6 years ago
Anonymous solution attached, you can further tweak it as per your need, but I guess this will give you the basic idea.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Anonymous it can be easily achieved using table merge and append, I don't see this an issue.
table 1 -> File 1 (latest): Jun to Dec 2020 data
table 2 -> File 2: Apr to Dec 2020 data
table 3 -> File 3: Jan to Mar 2020 data
1- create new merge table using where table 2 contains rows which are not in table 1 -> let's call it to merge table 1 and 2
2- now create another table combine of table 1 and above table from step 1, basically, this table has a unique months data from table 1 and table2
3- create another merge table from table 3 and table from step 2, get only new months from this table 3
4- create a final output table by combining tables of step 2 and step 3
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Hi parry2k ,
I did not understand the point where you mentioned 1- create new merge table using where table 2 contains rows which are not in table 1. In my case, the file has the same set of columns in the same order so I guess Append would be the appropriate command and not Merge. I did not see any option in Append to remove the unwanted rows. Can you help me to understand this better?
Also, the requirement is to automate this as these files would be placed in a folder so I was checking if there is any way to automate the loading of rows based on the latest file that would be loaded first. Will parameters or so help in this case?
If we can't automate this, would atleast like to know the manual options that are available.
Thanks,
Vishy