Skip to Content
0

Is it possible to delete leading zeros of characteristic values with FOX Formula in BI-IP

Oct 15, 2016 at 11:57 AM

73

avatar image

Hi all,

Is it possible to delete leading zeros of characteristic values with FOX Formula in BI-IP?

Thanks in advance and best regards

Gerd

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Marc Bernard
Oct 20, 2016 at 06:32 PM
0

Hi Gerd,

it should be possible with a combination of SUBSTR and DO. Something like the following (not tested).

Best,

Marc

Product Management SAP HANA DW

L = STRLEN( var ).
N = 0.
DO L TIMES.
  S = SUBSTR( var, 1, 1 ).
  IF S = '0'.
    N = N + 1.
    var = SUBSTR( var, 2, L - N ).
  ELSE.
    EXIT.
  ENDIF.
ENDDO.
Share
10 |10000 characters needed characters left characters exceeded
Gerd Trautwein Nov 03, 2016 at 09:34 AM
0

Thanks a lot

Share
10 |10000 characters needed characters left characters exceeded