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
Anonymous
Not applicable

import files based on file name in a folder

I have a large data set of various files all being placed in the same folder for example: 

Bounces_20220703.csv

Bounces_20220704.csv

Bounces_20220705.csv

Clicks_20220703.csv

Clicks_20220704.csv

Clicks_20220705.csv

Opens_20220703.csv

Opens_20220704.csv

Opens_20220705.csv

 

The folder will have a new file for each every day with the current date format YYYYMMDD after the file name

 

What I want to do is have all of the clicks collated together, all the opens and all the bounces, and when a refresh happens it combines the latest daily output. 

 

 

1 ACCEPTED SOLUTION

In Advanced Editor for Main Query, replace "C:\Test" with your path. Use the below pbix file to test.

https://1drv.ms/u/s!Akd5y6ruJhvhugSekEo72BRz9kUb?e=bMbsXj 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Three separate outputs if possible rather than combining them at this stage 

In Advanced Editor for Main Query, replace "C:\Test" with your path. Use the below pbix file to test.

https://1drv.ms/u/s!Akd5y6ruJhvhugSekEo72BRz9kUb?e=bMbsXj 

Anonymous
Not applicable

Hi,

Apologies are you able to send the code - as i am on my work laptop i still have an older version of Power Bi (cannot upgrade currently) so it wont let me open the file.

Since you are importing files from a folder, it is not a single code. Here is Excel file (you should have Excel, I presume) and you can change the C:\Test in Main Query.

https://1drv.ms/x/s!Akd5y6ruJhvhugX4raY_byMCVthP?e=n5Vk5h 

Anonymous
Not applicable

Perfect thank you,

 

I will mark the original PowerBi one as the solution for people 

Vijay_A_Verma
Super User
Super User

Do you need 3 different outputs - one each for Bounces, Clicks, Opens OR a single output combining only 3 of these?

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.

Top Solution Authors