Forum Discussion
modwonka
Helper I
4 years agoM if text contains, if not empty
Hi, I'm trying to improve one formula i did in M, to extract a date between brackets but i don't know how to advance. If anyone could help me, i would really appreciate it. This is the formul...
- 4 years ago
in was missing
let l=List.Transform( Text.Split([#"Tags (created on)"]," "), each Text.Remove(_,{"(",")",","})),
i=List.PositionOf(l, "BLUETEXT")
in if i>=0 then l{i+1} & " " & l{i+2} else null
Vijay_A_Verma
Most Valuable Professional
4 years agoI think should work for you in last line
if i>=0 then l{i+1} & " " & l{i+2} else null
modwonka
Helper I
4 years agoThanks for your answer Vijay_A_Verma!
I tried the solution with your code:
let l=List.Transform( Text.Split([#"Tags (created on)"]," "), each Text.Remove(_,{"(",")",","})),
i=List.PositionOf(l, "BLUETEXT"),
if i>=0 then l{i+1} & " " & l{i+2} else null
There's one error: "Token identifier expected". In the "if". Is this ok?