The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a column with data where I need to filter out lines with specific phrases and have found that the Conditional Column is not returning the results I would expect.
The column it's drawing from is in Text format, and contains information such as:
123test.Phrase.OtherText
Now that Phrase part could also appear in other parts of the text, but here it is nested by two dots, so I tried using a conditional column with this criteria:
If Column contains .Phrase. result is X. Only it's not picking it up.
If I manually filter on the query level to check, I can filter out the lines with .Phrase. but the Conditional Column tool doesn't recognize it and just returns null.
Any ideas?
PS: I'm not trying to filter out this data by itself, so filtering it out on query level wouldn't be a solution. I need to mark it as separate.
Solved! Go to Solution.
Hi,
can you use power query and do this in a custom column prior to a calculated column?
if so try:
if Text.Contains([Text Field],".Phrase.") then "X" else "Y"
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Additionally if you need to use DAX you could create a calculated column with the below:
Hi,
can you use power query and do this in a custom column prior to a calculated column?
if so try:
if Text.Contains([Text Field],".Phrase.") then "X" else "Y"
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Gives a Y answer for the lines that should be flagged X, unfortunately.
That's odd, seemes to be working for my tests:
do you have some other example data that it's not working on?
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Update: I just tried with case sensitive options, and it worked!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
77 | |
71 | |
47 | |
39 |
User | Count |
---|---|
136 | |
108 | |
70 | |
64 | |
57 |