Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vishy86
Post Patron
Post Patron

Loading selective months from previous data files

Hi,

 

I have a dataset with the Month column which contains data from Jun to Dec 2020. In another file sent, I have the dataset with the same set of columns but for months Apr to Dec 2020 i.e. it contains 2 months extra data for Apr and May as compared to the first file.

File 1 (latest): Jun to Dec 2020 data

File 2: Apr to Dec 2020 data

File 3: Jan to Mar 2020 data

 

I want to dynamically set up the data load in the Query Editor wherein the latest file i.e. File 1 is loaded completely and in the previous files i.e. File 2 and File 3, only the extra months data is loaded.

 

In above scenario, I would first like the data from File 1 fully loaded from Jun to Dec 2020.

Then, bring in data from File 2 and only load Apr and May 2020 as File 1 already contains the most recent and updated data from Jun to Dec 2020.

Last, bring in File 3 data but load the complete data as Jan to Mar data is not available previously.

 

I want to set this up dynamically in the Query Editor. Please note that there is no fixed frequency of producing these data files nor is there any consistency in the number of months of data contained in the file. I understand I can manually do it and remove the months I do not need in the Query Editor but the requirement is to dynamically set this up and possible automate it.

 

Is this possible in the Query Editor or any other way in Power BI? Please let me know with a sample pbix or so which would be helpful. Thanks.

 

Regards,

Vishy

 

1 ACCEPTED SOLUTION

@vishy86 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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

12 REPLIES 12

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.