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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
98 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |