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.
AND
If the answer was a "5" (on a scale from 1-5)
then bring back the value in [Responses]
else
0
I've counted the parenthesis and I have equal amounts.
What am I missing?
Any guidance would be greatly appreciated.
Hi Timoth,
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.
Try:
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.
Mynda