Forum Discussion
Power Query formula to Return value based on first 4 letters
Hi Experts
Need a formula for Power Query to Return Apples if the first for Charts in Column A start with NFRC otherwise return Ignore.
In column A I have reference numbers NFRC122ui91901 etc and so on..
You can add a custom column with this formula in the query editor.
= if Text.Start([Column1], 4) = "NFRC" then "Apples" else "Ignore"
Pat
5 Replies
- parry2k
Super User
Anonymous not sure what you are looking for. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490- AnonymousNot applicable
Hi Parry2k
I'll add a sample file..
- AnonymousNot applicable
See sample.data set. If reference starts with NFRC then new.column Return Apples for corresponding reference.
Otherwise text ignore same column.
- mahoneypat
Microsoft Employee
You can add a custom column with this formula in the query editor.
= if Text.Start([Column1], 4) = "NFRC" then "Apples" else "Ignore"
Pat