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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ValeriaBreve
Post Patron
Post Patron

Looping through folder files

Hello,

I am looking for guidance here...

I have a folder with actual and forecast data files, for the same products, each one containing the same columns but one will be stamped Aug, the other one Sept, etc with revised actual/forecast figures.

ValeriaBreve_0-1665755223627.png

 

I need establish forecast accuracy and stability, so read the same forecast (e.g. Product A for Jan 2023) on every file and compare them. (n, n-1, n-2, n-3, etc)

 

Now, from PowerQuery I am able to get to the folder, rank the files, but then? What's best? Is it OK to have 1 query per file with the related file creation date and then make the relationships in the report? Or is there another way of handling this type of situation?

 

Thanks a lot!

Kind regards

Valeria 

 

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @ValeriaBreve ,
you should keep them in one query and use the Index column in your DAX measures to distinguish between them. 
Use the Combine Binaries method to create the consolidated query: New Combine Binaries Experience - Excelguru

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

3 REPLIES 3
ImkeF
Community Champion
Community Champion

You are welcome @ValeriaBreve  🙂

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

ValeriaBreve
Post Patron
Post Patron

Thank you so much Imke!!!!!!! It is the first time I have this type of data, I was more used to production data, so thanks for pointing me to the right direction! 

ImkeF
Community Champion
Community Champion

Hi @ValeriaBreve ,
you should keep them in one query and use the Index column in your DAX measures to distinguish between them. 
Use the Combine Binaries method to create the consolidated query: New Combine Binaries Experience - Excelguru

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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