Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

contains string in power query

Hi

Is it possible to do something similar to the below in power query, i currently have this measure as a calculated column in my table:

 

IF (
    CONTAINSSTRING ('Table'[Entry], "Attend" ),"Attended",
 if(CONTAINSSTRING(Table [Entry], "Late"), "Late",
 if(CONTAINSSTRING('Table [Entry],"Withdraw"),"Withdraw",
 "Other")))
 
The above does work just thinking may be more efficient to complete in power query or if there is a better way to do the above as a column.
Some of the words within the text maybe attendance, attended, withdrawal, withdraw which is why i have put Attend, withdraw.
 
Thank you