cancel
Showing results for 
Search instead for 
Did you mean: 

If and Else statement in webi

08-10-2017 5:14 PM
2095 views 4 comments
0 Likes
SAP Managed Tags
Subscribe

Hello Friends,


I am struggling with a if and else statement in WebI, thought i post it here for quick help.

=If
([V100 2012].[Net Forecast]=0 Or IsNull([V100 2012].[Net Forecast]))
Then ([V200 2012].[Net Forecast])

ElseIf
([V200 2012].[Net Forecast]=0 Or IsNull([V200 2012].[Net Forecast]))
Then ([V300 2012].[Net Forecast])

Else
([V100 2012].[Net Forecast])

This statement does not seem to be working in a situation where variable [V100 2012].[Net Forecast] has a value greater than 0 and [V200 2012].[Net Forecast] & [V300 2012].[Net Forecast] is either 0 or null as it should give the value for [V100 2012].[Net Forecast] but instead produces the value for [V300 2012].[Net Forecast]

Can someone please help.


Thanks.

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

amitrathi239
Active Contributor
0 Likes

what about if you add one more if-else condition?

=If
([V100 2012].[Net Forecast]=0 Or IsNull([V100 2012].[Net Forecast]))
Then ([V200 2012].[Net Forecast])

ElseIf
([V200 2012].[Net Forecast]=0 Or IsNull([V200 2012].[Net Forecast]))
Then ([V300 2012].[Net Forecast])

elseif

([V100 2012].[Net Forecast]>0 Or IsNull([V200 2012].[Net Forecast]
or IsNull([V300 2012].[Net Forecast])))

Then ([V100 2012].[Net Forecast])

else

([V100 2012].[Net Forecast])