cancel
Showing results for 
Search instead for 
Did you mean: 

Webi Variable Help / Remove Character Based On Another Column

former_member557046
Participant
0 Kudos

Hello,

I have a report that has 2 columns as below

ID Group

F562 A

D123 B

863 C

What I need to do is display as follows:

ID Group

562 A

123 B

863 C

So, If the group is A or B, remove the first character of the ID column. If Group C, leave as is.

Any Ideas?

Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

Tom_N8
Contributor
0 Kudos

Hi Chuck,

Try creating a variable with the following formula:

=If(Right([ID Group];1)="A") Then Substr([ID Group];2;5) Else If(Right([ID Group];1)="B") Then Substr([ID Group];2;5) Else [ID Group]

If the length of your id groups is greater than 5 (after the leading character) then increase the value '5' to a bigger value in the sub string expression.

Kind regards,

Tom

former_member557046
Participant

Thank you Tom.

It works great.. 🙂

Answers (0)