cancel
Showing results for 
Search instead for 
Did you mean: 

Elseif in Webi

Former Member
0 Kudos

while creating a report in Webi , i am  using a cross table and i want to calculate total for some dimension values.

For this i have created a dimension using the IF function.

Like:   If([Dimension]="10" Or [Dimension]="30" )Then "10/30" Else "15/20" . This is working fine.

But when i include total also in it , it does not give the value of total

like :  If([Dimension]="10" Or [Dimension]="30")Then "10/30"

         ElseIf ([Dimension]="15" Or [Dimension]="20") Then "15/20"

         ElseIf([Dimension]="10" Or [Dimension]="30" Or [Dimension]="15" Or [Dimension]="20") Then "Total"

10/30, 15/20 are comming but Total is not comming,

Any idea or any other alternative.

Thanks in advance..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Rahul,

The condition got satisfied in first & second  if block itself and so its not going to last ElseIF loop.

Hope this clears. Let me know if i misse dout something

Answers (1)

Answers (1)

former_member182342
Active Contributor
0 Kudos

Hi Rahul,

Just Check your formula  or check whether the field you are using in formula is dimesion or something else.

Because i tried the same same elseif formula but my result coming correct . I am attaching a screenshot with example.It really help you.

Regards,

Anish

Former Member
0 Kudos

Hi Rajan and Anish,

Thanks for your replies. Rajan what you are saying is correct. But can we have a way by which we can have all the three values, which i want on my dimension like 10/30, 15/20, Total. By restructuring the IF - IF Else statement or any other alternative way.

thanks.

Former Member
0 Kudos

Dear Rahul,

This can be handled by creating a varaible  .

Variable A

If([Dimension]="10" Or [Dimension]="30" Or [Dimension]="15" Or [Dimension]="20")

Then [variableA]="TOTAL"

Variable B

If([Dimension]="10" Or [Dimension]="30")Then [variableB]="10/30" 

         ElseIf ([Dimension]="15" Or [Dimension]="20") Then [variableB]="15/20"

U can use [variableA] and [variableB] where ever u require.

Former Member
0 Kudos

ya thanks rajan, i have resolved it using this approach itself. Infact i have created 3 variables and using them in a verticle table instead of a cross tab.As in cross tab i was not getting the format i wanted.

Thanks a lot