Calculation - IsSelected

Example of using isSelected function from a Targit calculation in the Datamodel editor.


Cost Amount (Actual):

Iif(
isSelected("Currency Selector.Currency Selector", [Currency Selector].&[Local Currency]), [Cost Amount ( Actual ) Local Currency],
Iif(isSelected("Currency Selector.Currency Selector",[Currency Selector].[USD]), [Cost Amount ( Actual ) USD]
, [Cost Amount ( Actual ) USD])
)


So this example basically uses a Dimension called Currency Selector which has 2 values in it:

  • USD
  • Local Currency.

The data model has 2 physical measures:

  • [Cost Amount ( Actual ) Local Currency]
  • [Cost Amount ( Actual ) USD]

The Currency Selector dimension is typically added to the Criteria bar in the TARGIT client:

  • When the user selects Local Currency, it will return the [Cost Amount ( Actual ) Local Currency] measure.
  • When the user Selects USD, it returns the [Cost Amount ( Actual ) USD] measure.
  • When nothing is selected, it defaults to [Cost Amount ( Actual ) USD].

 

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.