Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested IF Statement Help

Hi,

I am having trouble with a nested IF statement;

I'm getting an error of "Error in expression, if takes 2-3 parameters"

The query below has 2 clear statements and an alternative outcome so I'm not sure why this fails. Can someone advise where I am going wrong?

=IF((Team = 'West Ham' and Result = 'Home Win' and IsHomeTeam = 'Yes')
OR (Team = 'West Ham' and Result = 'Away Win' and IsHomeTeam = 'No'),'W',
IF(Team = 'West Ham' and Result = 'Draw'),'D',
'L')

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Try with

=IF((Team = 'West Ham' and Result = 'Home Win' and IsHomeTeam = 'Yes')
OR (Team = 'West Ham' and Result = 'Away Win' and IsHomeTeam = 'No'),'W',
IF(Team = 'West Ham' and Result = 'Draw','D',
'L') )

let me know

View solution in original post

7 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try with

=IF((Team = 'West Ham' and Result = 'Home Win' and IsHomeTeam = 'Yes')
OR (Team = 'West Ham' and Result = 'Away Win' and IsHomeTeam = 'No'),'W',
IF(Team = 'West Ham' and Result = 'Draw','D',
'L') )

let me know

maxgro
MVP
MVP

IF( (Team = 'West Ham' and Result = 'Home Win' and IsHomeTeam = 'Yes') OR (Team = 'West Ham' and Result = 'Away Win' and IsHomeTeam = 'No'), 'W',

IF( (Team = 'West Ham' and Result = 'Draw' ), 'D',

'L'))

Anonymous
Not applicable
Author

Try this:


Misiing brackets..


=IF(((Team = 'West Ham' and Result = 'Home Win' and IsHomeTeam = 'Yes')

       OR (Team = 'West Ham' and Result = 'Away Win' and IsHomeTeam = 'No')),'W',
IF((Team = 'West Ham' and Result = 'Draw'),'D','L'))

Not applicable
Author

Many thanks guys, it's always a missing bracket!

Can you advise now this IF statement works how I would use the Visual Cues to make the expression background Green for a W, Red for an L and Grey for a D?

Anonymous
Not applicable
Author

Go to Visual Cues of your reports object

and set the color like Text/Backgroud etc..

PFA

Anonymous
Not applicable
Author

Select your expression name in you Visual Cues properties of Reports from top left,

and apply cues as per ur reqs..

Not applicable
Author

I've set the following up, but it does not work?

cues.png