Excel Customer Service
April 27, 2014
I am getting a Token RightParen error message for this formula:
if(Text.PositionOf([Question],"performance")>0 and [Answer]="5" then [Responses] else 0)
In plain English
[Question] is a field that has a question that may contain the word "performance".
So if Question contains the string "performance" it will give a value and if the value is >0, then it is TRUE.
If the answer was a "5" (on a scale from 1-5)
then bring back the value in [Responses]
I've counted the parenthesis and I have equal amounts.
What am I missing?
Any guidance would be greatly appreciated.
July 16, 2010
If the Answer column contains numbers then you don't wrap the 5 part in double quotes. Also, 'if' in Power Query doesn't have opening and closing parentheses.
if Text.PositionOf([Question],"performance")>0 and [Answer]=5 then [Responses] else 0
Don't forget Power Query is case sensitive, so it's looking for 'performance' in lower case.