Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Can anyone help me figure out where I have gone wrong? I am trying to grab more rows based on the common variations of "no note from tutor" but adding an "and" breaks the current working function
This one works
= Table.SelectRows(#"Exclude Blank and NA Notes", each Text.Contains([Notes], "No note from Tutor"))
This one is broken
= Table.SelectRows(#"Exclude Blank and NA Notes", each Text.Contains([Notes], "No note from Tutor" and "No notes from Tutor"))
Solved! Go to Solution.
You need to repeat the entire test (Text.Contains)
and you need to connect the tests with an or , not an and
I also suggest you make the test case-insensitive
= Table.SelectRows(#"Exclude Blank and NA Notes", each
Text.Contains([Notes], "No note from tutor", Comparer.OrdinalIgnoreCase)
or Text.Contains([Notes], "No notes from tutor",Comparer.OrdinalIgnoreCase))
You could also use the List.Contains method as suggested by @jgeddes but, again, I would add the case insensitive option:
= Table.SelectRows(#"Exclude Blank and NA Notes", each
List.Contains({"No note from tutor","No notes from tutor"},
[Notes],
Comparer.OrdinalIgnoreCase))
Hi @Nephandi99 ,
If @ronrsnfld , @jgeddes response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found that response helpful.
Thank you
You need to repeat the entire test (Text.Contains)
and you need to connect the tests with an or , not an and
I also suggest you make the test case-insensitive
= Table.SelectRows(#"Exclude Blank and NA Notes", each
Text.Contains([Notes], "No note from tutor", Comparer.OrdinalIgnoreCase)
or Text.Contains([Notes], "No notes from tutor",Comparer.OrdinalIgnoreCase))
You could also use the List.Contains method as suggested by @jgeddes but, again, I would add the case insensitive option:
= Table.SelectRows(#"Exclude Blank and NA Notes", each
List.Contains({"No note from tutor","No notes from tutor"},
[Notes],
Comparer.OrdinalIgnoreCase))
When you use Text.Contains you need to restate the column reference. This should work...
Table.SelectRows(#"Exclude Blank and NA Notes", each Text.Contains([Notes], "No note from Tutor") and Text.Contains( [Notes], "No notes from Tutor"))
You may also want to consider using List.Contains.
Table.SelectRows(#"Exclude Blank and NA Notes", each List.Contains({"No note from Tutor", "No notes from Tutor"}, [Notes]))
Proud to be a Super User! | |
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 |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |