Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Token RightParen expected problem

= Table.AddColumn(#"Added Custom", "Group of Rank Code2", each if ([RANK_CODE]="04","Manager",[RANK_CODE]="05","Manager", [RANK_CODE]="07" ,"Manager", [RANK_CODE]="08" ,"Manager", [RANK_CODE]="09" ,"Manager", [RANK_CODE]="15" ,"Manager", [RANK_CODE]="16" ,"Manager", [RANK_CODE]="17" ,"Manager", [RANK_CODE]="22" ,"Manager", [RANK_CODE]="36", "Manager" , "Agent"))

 

Expression.SyntaxError: Token RightParen expected.

 

not really sure where i went wrong, looking for help to solve this 

  • Anonymous , I think if is not used correctly , try something like

    Table.AddColumn(#"Added Custom", "Group of Rank Code2", each if [RANK_CODE]="04" or [RANK_CODE]="05" or [RANK_CODE]="07" or [RANK_CODE]="08" or [RANK_CODE]="09" or [RANK_CODE]="15" or [RANK_CODE]="16" or [RANK_CODE]="17" or [RANK_CODE]="22" or [RANK_CODE]="36" then "Manager" else "Agent")

1 Reply

  • Anonymous , I think if is not used correctly , try something like

    Table.AddColumn(#"Added Custom", "Group of Rank Code2", each if [RANK_CODE]="04" or [RANK_CODE]="05" or [RANK_CODE]="07" or [RANK_CODE]="08" or [RANK_CODE]="09" or [RANK_CODE]="15" or [RANK_CODE]="16" or [RANK_CODE]="17" or [RANK_CODE]="22" or [RANK_CODE]="36" then "Manager" else "Agent")