Adding a Variable

Adds a variable definition to a Web Intelligence document.
Remember The formula must be valid. You can only create a measure, an attribute or a dimension. When you create an attribute, the associated dimension is mandatory.
Request

POST <webiURL>/documents/{documentId}/variables

Where:

  • {documentId} is the document identifier retrieved from the list of documents

Request body:

<variable qualification="...">  
    <name>
    <definition>  
</variable>

Where:

  • qualification is the type of variable (Measure, Attribute, Dimension)
  • definition is the formula used by the variable
Response

Response type: application/xml or application/json

The response is a message stating the success or failure of the request.

Example

POST <webiURL>/documents/4326/variables

Request body:

<variable qualification="Measure">  
    <name>new variable</name>
    <definition>=[RevenueThreshold]*[Threshold factor]</definition>  
</variable>

Response:

<success>
    <message>The resource of type 'Variable' with identifier 'LB' has been successfully created.</message>
    <id>LB</id>
</success>