In the conditional rule example the “@” symbol was used, as in:

If(Entity==@UK, 20, 25)

For this rule to work requires Cubix to lookup the entity at the time of calculation to see if it is the UK. In relation to dimension members or attributes @ tells Cubix that you are providing the name of the item you want to reference (as opposed to its position in the list). So the above example could be read as:

If the current Entity has the name UK then….

The alternative is to use the index value. The index value is the position the items holds in the dimension list. (Note: When counting the members in the list Cubix is zero based. It starts counting at zero not one).
So if the list of entities contained France, Germany, UK, Australia, New Zealand and Japan (in that order) the above example could also be written as:

If(Entity==2, 20, 25)

This example could be read as:

If the current Entity is item 2 in the list of Entities then… 

However, this does make the rules more difficult to read and interpret. Also, changes to the model structure may affect the accuracy of the rules. For example, the rule could become invalid if an entity was inserted into the model, causing the UK to now become item 3 in the list.

Using @Input in Rules

Sometimes you may want to create a rule that tests for a certain condition and when that condition is not met, to treat that cell as an input cell rather than a calculated cell (which won’t allow input).
The means of achieving this is by using @input in your rule. @Input tells Cubix to treat that portion (or argument) of the rule as user input rather than a calculated value.

This way you can have the best of both worlds; have a rule apply to a variable, if the rule does not apply then allow user input.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
Centrixe Support

Post Comment