cancel
Showing results for 
Search instead for 
Did you mean: 

WEBI If and condition

Former Member
0 Kudos

Hi Experts

i'm new in webi, n need help.

I have tried a few formula in webi, but was not able to achieve the result i wanted,

what i want was --> if legacy system = 'xxx' and 'yyy' and 'zzz', value = "total", else legacy system

but when i tried

=If([Legacy System] = "XXX"; [Legacy System];

If([Legacy System] = "YYY"; [Legacy System];

If([Legacy System]= "ZZZ"; [Legacy System]; "TOTAL")))

i get all 3 XXX, YYY and ZZZ displayed.

I couldn't figure out how to use the And condition for IF statement

I also tried

=If (count([Legacy System];distinct) > 1;"TOTAL";[Legacy System])

but failed.

any advice? thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

= If [Legacy System] inlist("XXX";"YYY";"ZZZ") then [Total] else [Legacy System]

Former Member
0 Kudos

Hi,

i managed to temporarily solved it by first creating a measure called test

=Count([Legacy System];Distinct)

then i created a dimension,

=If([test] > 1;"TOTAL";[Legacy System])

the value came out as expected.

i am still interested to know how the AND condition works in WEBI

THanks!

former_member182342
Active Contributor
0 Kudos

Hi Sri Melur,

Check the below formula

=If [Legacy System]="xxx" Then [Total] ElseIf [Legacy System]="yyy" Then [Total] Elseif [Legacy System]="zzz" Then [Total] else [Legacy System]

Regards,

Anish

Former Member
0 Kudos

Hi Anish

Thanks for the reply.

The formula didn't work for me, it kept having errors.

THanks!

amitrathi239
Active Contributor
0 Kudos

Hi ,

Try with below formula's.

=If([Legacy System] InList ("xxx";"yyy";"zzz")) Then [Total] Else [Legacy System]

or

=If(([Legacy System] ="xxx") Or ([Legacy System] ="yyy") Or ([Legacy System] ="zzz"))  Then [Total] Else [Legacy System]

Regards,

Amit

0 Kudos

I think is

=If(([Legacy System] ="xxx")  And  ([Legacy System] ="yyy") And ([Legacy System] ="zzz"))  Then [Total] Else [Legacy System]

Regards

wang