Forum Discussion
PCarson00
2 years agoFrequent Visitor
IF conditions for filtering in Power Query
I have a set of data I want to filter in one column but not sure how to go about this. Here is my attempt at the explanation IF text begins with "L01" or "L04" then remove first 3 characters ...
- 2 years ago
pls try this
if Text.Start([DATA],3) ="L01" or Text.Start([DATA],3) ="L04" then Text.RemoveRange([DATA],0,3) else Text.RemoveRange([DATA],0,1) or======== if Text.StartsWith([DATA],"L01") or Text.StartsWith([DATA],"L04") then Text.RemoveRange([DATA],0,3) else Text.RemoveRange([DATA],0,1)
Ahmedx
2 years agoSuper User
pls try this
if Text.Start([DATA],3) ="L01" or Text.Start([DATA],3) ="L04" then Text.RemoveRange([DATA],0,3) else Text.RemoveRange([DATA],0,1)
or========
if Text.StartsWith([DATA],"L01") or Text.StartsWith([DATA],"L04") then Text.RemoveRange([DATA],0,3) else Text.RemoveRange([DATA],0,1)