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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ashmitp869
Post Partisan
Post Partisan

filter from a sharepoint folder - power query

Hi,

 

How can filter from a sharepoint folder with file name 

Course439.csv

Course196.csv

Course111.csv

Courseany3digit.csv

 

ashmitp869_0-1741735726076.png
Thanks

 

1 ACCEPTED SOLUTION
kushanNa
Super User
Super User

HI,

use the following filter 

 

 

 

= Table.SelectRows(#"Changed Type", each  
    Text.StartsWith([Name], "Course") and  
    Text.EndsWith([Name], ".csv") and  
    Text.Length([Name]) >= 8 and  
    List.Contains({"0".."9"}, Text.Middle([Name], 6, 1)))

 

 

Before Filter

kushanNa_1-1741750635167.png

 

 

after filter

kushanNa_0-1741750609223.png

 

 

 

View solution in original post

7 REPLIES 7
kushanNa
Super User
Super User

HI,

use the following filter 

 

 

 

= Table.SelectRows(#"Changed Type", each  
    Text.StartsWith([Name], "Course") and  
    Text.EndsWith([Name], ".csv") and  
    Text.Length([Name]) >= 8 and  
    List.Contains({"0".."9"}, Text.Middle([Name], 6, 1)))

 

 

Before Filter

kushanNa_1-1741750635167.png

 

 

after filter

kushanNa_0-1741750609223.png

 

 

 

Hi @ashmitp869 ,

Thank you for reaching out to the Microsoft Community Forum.

 

If @kushanNa , response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found this response helpful.

Thank you

 

Hi @ashmitp869 ,

Thank you for reaching out to the Microsoft Community Forum.

 

If @kushanNa , response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found this response helpful.

Thank you

parry2k
Super User
Super User

@ashmitp869 click the filter (down arrow) and use text filter -> begins wtih

 

parry2k_0-1741745074369.png

 

k on the filter and then use start withs



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.

That's not possible as I have a file name CourseList which I don't want to pick

ashmitp869_0-1741747197714.png

 

parry2k
Super User
Super User

@ashmitp869 is this a fixed value for the names or based on some logic?



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.

No its not fixed.

 

Is can be CourseXXX.csv
XXX can be any three digit (random)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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