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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Import files from folder but when the creation date matches a data in a custom calendar

Hello,

I can import files from a folder and filter them based on its creation date etc. but I'd like to enhance it so that I filter out dates (dates are within the filename) that don't exist in a calender. I have a custom calendar in an excel file that defines bill cycle. 

 

Is there a way to filter the filenames when the date in the filename matches any value in my calendar file?

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Yes, you can extract the Date from filename first, then add another coloumn or you can use it within the same column to check with it is in the Calendar Date list. Make sure your date from filename has the same type/format with the Calendar Date. The CalendarDate here is my date list

Table.AddColumn(#"Added Custom", "Custom", each List.Contains(CalendarDate,[DateinFile]))

 

Vera_33_0-1619752418724.png

 

View solution in original post

3 REPLIES 3
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Yes, you can extract the Date from filename first, then add another coloumn or you can use it within the same column to check with it is in the Calendar Date list. Make sure your date from filename has the same type/format with the Calendar Date. The CalendarDate here is my date list

Table.AddColumn(#"Added Custom", "Custom", each List.Contains(CalendarDate,[DateinFile]))

 

Vera_33_0-1619752418724.png

 

Anonymous
Not applicable

Funny thing is when I do the same thing in Data Flow I get the following eror;

Expression.Error: We cannot convert the value "[Binary]" to type Binary.

Anonymous
Not applicable

yes I did exactly that but slightly modified

if (List.Contains(BillingCalendar,[Date created])=true) then true else false

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors