Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I know this work for me, but I also want to check if the text doesnt contain a character:
if (Text.Contains([DATE], "/") and Text.Length([DATE])=10)
The date field is very messed up with many variations. So I also need to check, like the example above, if there's if no character in the field. Like "Text.DoesnContain". Is there maybe a way to detect if Text.Contain is true or false, maybe?
Thank you.
Solved! Go to Solution.
Text.Contains does return true or false already (and you are using it in your formula).
You can reverse the ouput by putting "not " (lower case) in front of it, like in
if (not Text.Contains([DATE], "/") and Text.Length([DATE])=10)
Text.Contains does return true or false already (and you are using it in your formula).
You can reverse the ouput by putting "not " (lower case) in front of it, like in
if (not Text.Contains([DATE], "/") and Text.Length([DATE])=10)
@ibarrau I guess Power Query is far less limitated then you might expect...
Nice Marcel! The other response was not a solution for me because, as I said, the problem was really more complex. Thank you!
The thing with power query is that it is limitated. I think you don't need to ask about doesn't contain, just go to false in contains.
E.g:
if Text.Contains([DATE], "/") then
if Text.Length([DATE])=10 then "both true"
else "here is different to than 10"
else "here doesn't contain"
Hope this helps.
P/D Blank and null can be treated with button transformations.
Happy to help!
User | Count |
---|---|
79 | |
77 | |
70 | |
68 | |
54 |
User | Count |
---|---|
107 | |
99 | |
88 | |
79 | |
67 |