Skip to Content

issue using excel formula in transformation file


I'm trying to remove invalid characters from CSV file for this, I'm using following formula but BPC is not accepting.

Is there something wrong?

Are there any better ideas (apart from using formula in transformation file) to remove invalid characters?


MATERIAL dimension has a member of "testmat". if CSV file is trying to load a value of "test-mat", I would like to replace CSV file with "testmat".

So, Basically, I would like to remove all characters of "-" for dimension MATERIAL in my csv file with a blank character.

Also, are there any limitations on which excel formulas we can use in transformation file? Is there any online documention on this.

Appreciate any help.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 12, 2011 at 04:16 PM

    Hi there,

    You can't do this in the Transformation file. However, you can use the visual basic in the conversion file for this.

    Here's some info from the help file:

    Visual Basic in formulas

    You can use simple Visual Basic syntax in formulas. Precede the Visual Basic code with: vb:

    You can use Visual Basic code inside IF statements, too. The IF statement has the following definition:

    If(A1=B1 then c1; A2 = B2 then C2; ... ; ELSE D)

    This statement executes the first condition that evaluates to TRUE. If none of the conditions are true, and you have defined an ELSE section, that condition is used.

    Example: If(%external%=act* then Actual; %External% = bud* then budget; ELSE forecast)

    Conversion Examples:


    a,If(%external%=act then Actual; vb:len("%external%")=4 then budget;Actual)

    b*,If(%external%=BCT then Act???; vb:len("%external%")=1 then budget;Budget)

    c*,vb: replace("%external%","act","bud")

    Formula Examples:


    vb: len("%external%"),Returns a Long containing the number of characters in a string

    vb: mid("%external%",1,2),Returns a Variant (String) containing a specified number of characters from a string

    vb: replace("%external%","a","c"),Returns a string in which a specified substring has been replaced with another substring a specified number of times.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.