Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
I am importing pdf files from a folder. Everything went well with the first file but when
Part of my editing (in the query editor) is to filter column1 to remove several values. When I added a second file to the folder this filter stopped working and the row is not filtering out of the dataset.
Here is the M code that is generating:
= Table.SelectRows(#"Changed Type", each ([Column1] <> null and [Column1] <> 12/4/2018 and [Column1] <> "All"))
Here is an example of the data importing.
Source.Name | Column1 | Column2 | Column3 |
Nov 18 Reasonableness Check.pdf | 12/4/2018 | FIPS | Oct 19 |
Nov 18 Reasonableness Check.pdf | Statewide | 1161132 | |
Nov 18 Reasonableness Check.pdf | county name | 1 | 31789 |
Each month the "12/4/2018" in Column1 will be a different date in a datatype text.
What I need to do is replace the "12/4/2018" in the code with some type of wildcard that will recognize the style (xx/xx/xxxx) and filter out that row no matter what date is listed. I do not need any of the fields in that row.
I've tried to replace the 12/4/2018 with ?/?/? with no luck. I've also tried the % sign and * sign in place of the question mark.
This is how I would like the file to look with additional files added. The numbers in Column2 & Column3 are importing correctly. I just can't seem to get the one row to filter out.
Source.Name | Column1 | Column2 | Column3 |
Nov 18 Reasonableness Check.pdf | Statewide | 1161132 | |
Nov 18 Reasonableness Check.pdf | county name | 1 | 31789 |
Oct 18 Reasonableness Check.pdf | Statewide | 1201123 | |
Oct 18 Reasonableness Check.pdf | county name | 1 | 32555 |
Any help is greatly appreciated. Thank you.
Solved! Go to Solution.
What if you make this change in red font below
= Table.SelectRows(#"Changed Type", each ([Column1] <> null
and Text.Contains([Column1],"/")=false and [Column1] <> "All"))
What if you make this change in red font below
= Table.SelectRows(#"Changed Type", each ([Column1] <> null
and Text.Contains([Column1],"/")=false and [Column1] <> "All"))
This worked perfectly for this project and another file I've been trying to import. Thank you so much.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
78 | |
59 | |
36 | |
33 |
User | Count |
---|---|
94 | |
61 | |
56 | |
49 | |
41 |