Oracle Analytics Cloud (OAC) - Configuring Default Currency Options for Answers (Analysis) Dashboards

April 29, 2020 | 14 minute read
Jay Pearson
Consulting Solutions Architect, Business Intelligence
Text Size 100%:

 Background

* This blog was last tested on OAC 105.8.0-133 (Version 5.8) + ADW 18c *

*** This blog is not applicable for BIApps OAC customers. BIApps customers should follow this MOS "Doc ID 2663180.1: OBIA 11g:Setting User Preferred Currency Options in BIApps". The BIApps doc can be found by logging onto My Oracle Support. Additional documentation on BIApps currency settings can be found here. ***

This article walks through the steps to configure non-BI Apps Oracle Analytics Cloud (OAC) default currency options. It is only relevant for Answers (Analysis) Dashboards. These settings are not applicable to Data Visualization (DV).

These features may not necessarily be supported in this exact manner in future releases. Only use this blog if you have a strong business case for modifying/setting the default currency options.

Click here for recommended prerequisite reading on OAC Configuring Default Currency.

Click here for Chapter on "Defining User-Preferred Currency Options" in "Oracle® Fusion Middleware System Administrator's Guide for Oracle Business Intelligence Enterprise Edition (OBIEE)".

Note: Not all OBIEE currency configuration options are available in OAC.

Within OAC there are two places where currency defaults can be set:

1)    "User Currency Preferences XML" - used to edit the user account preferences currency.

2)    "Currencies XML" - used to edit the analysis column properties currency symbol list.

The blog demonstrates how to:

* Customize the list of available currencies in the user account preferences.

* Create and display the PREFERRED_CURRENCY session variable.

* Use the PREFERRED_CURRENCY session variable to set the default currency.

* Customize the list of currencies available in the analysis currency symbol list.

* Set the default currency using the "int:wrhs" tag.

 User Currency Preferences XML

User "Currency Preferences XML" is accessed from Console -> System Settings:

The "User Currency Preferences XML" can be used to customize the user account preferences currency.

This is the list of currencies available under: Classic Home -> My Account -> Preferences -> Currency.

By default the preferences contain BIApps currencies defined in a separate XML. These currencies are not applicable to non-BIApps OAC customers.

For non-BIApps customers the user currency preferences are defined in an XML file named userpref_currencies.xml located on OAC. There is no need to physically access the file as it can be modified through the system settings. The file is automatically updated based on the XML saved into the "User Currency Preferences XML" and pushed to OAC after a restart of the "OBI Presentation Server".

Sample extract from the userpref_currencies.xml file: 

IMPORTANT! Do not copy this XML into "User Currency Preferences XML". The required format is shown in the following section.

<Config>
<UserCurrencyPreferences>
<!--
<UserCurrencyPreferences currencyTagMappingType="static">
  <UserCurrencyPreference sessionVarValue="gc1" displayText="Global Currency 1" currencyTag="int:USD" />
  <UserCurrencyPreference sessionVarValue="gc2" displayText="Global Currency 2" currencyTag="int:euro-l" />
  <UserCurrencyPreference sessionVarValue="gc3" displayText="Global Currency 3" currencyTag="loc:ja-JP" />
  <UserCurrencyPreference sessionVarValue="orgc" displayText="Org Currency" currencyTag="loc:en-BZ" />
  <UserCurrencyPreference sessionVarValue="lc1" displayTag="int:DEM" currencyTag="int:DEM" />
</UserCurrencyPreferences>
-->
</UserCurrencyPreferences>
</Config>

 Customize Classic User Account Preferences

This example overrides the list of available currencies in the user account preferences with a custom list.

Sample XML

Copy and paste from this text version of the example to avoid unwanted characters being copied from the browser.

<UserCurrencyPreferences currencyTagMappingType="static">
   <UserCurrencyPreference sessionVarValue="sv_USD" currencyTag="int:$" />
   <UserCurrencyPreference sessionVarValue="sv_GBP" currencyTag="loc:en-GB" />
   <UserCurrencyPreference sessionVarValue="sv_NONE" currencyTag="none" />
</UserCurrencyPreferences>

Options

sessionVarValue sets the session variable PREFERRED_CURRENCY that uniquely identifies each currency.

currencyTag sets the corresponding currency tag as defined in the currencies.xml file.

The example provided uses the following currencyTag's:

"int:$" = US Dollar Symbol

"loc:en-GB" = British Pound Sterling (GBP) Symbol

"none" = No Currency Symbol

Observations

There appears to be no method to append to the default list of preferred currencies. The only option is is replace the list in its entirety with a newly defined list.

Update User Currency Preferences XML

Update the "User Currency Preferences XML" with the sample XML provided.

Console -> System Settings -> "User Currency Preferences XML":

Restart

Restart "OBI Presentation Server":

Refresh

Log out and the log back into OAC. This is important for it to refresh.

Results

Go to: Classic Home -> My Account -> Preferences -> Currency -> the new list of currencies is available:

 Set Default Currency using PREFERRED_CURRENCY Session Variable

Create a Session Variable Initialization Block INIT_PREFERRED_CURRENCY and Session Variable PREFERRED_CURRENCY. Set the Session Variable Default Initializer to be the sessionVarValue previously defined in "User Currency Preferences XML" that represents the desired default currency.

i.e.

"User Currency Preferences XML" sessionVarValues:

<UserCurrencyPreferences currencyTagMappingType="static">
   <UserCurrencyPreference sessionVarValue="sv_USD" currencyTag="int:$" />
   <UserCurrencyPreference sessionVarValue="sv_GBP" currencyTag="loc:en-GB" />
   <UserCurrencyPreference sessionVarValue="sv_NONE" currencyTag="none" />
</UserCurrencyPreferences>

~

SELECT 'sv_GBP' FROM DUAL;

Add the Session Variable to the analysis to test it. VALUEOF(NQ_SESSION.PREFERRED_CURRENCY)

Publish the modified RPD:

It is also recommended to force a re-start of the "OBI Presentation Server":

Notice Preferences "Default -" is now prefixed with "£ English - Untied Kingdom":

Also, notice that the Session Variable in the analysis is populated with "sv_GBP:

In the user preferences - switch chosen currency to "(None)". Notice that the Session Variable in the analysis changes to reflect this change. However, the "Default - £ English - Untied Kingdom" in the drop-down continues to be the default selection value as set from the initialization block.

The PREFERRED_CURRENCY can be used for dynamic currency conversions/calculations (such as CASE statements).

 Currencies XML

"Currencies XML" is also accessed from: Console -> System Settings.

The "Currencies XML" can be used to customize the analysis column properties currency symbol list. This is the list of currencies available under: Classic Home -> Create or Edit an Analysis  -> Criteria -> Column Properties -> Data Format -> Currency Symbol.

The "Currencies XML" are defined in an XML file named currencies.xml located on OAC. There is no need to physically access the file as it can be modified through the system settings. The file is automatically updated based on the XML saved into the "Currencies XML" and pushed to OAC after a restart of the "OBI Presentation Server".

The currencies.xml contains hundreds of predefined currencies. The full version of the file can be downloaded from here.

Sample extract from currencies.xml file: 

<Currencies>
   <Currency tag="none" type="international" symbol="" displayMessage="kmsgCurrencyNone" format="$#" />
   <Currency tag="int:wrhs" type="international" placeholder="true" symbol="$" format="$#" digits="2" displayMessage="kmsgCurrencySiebelWarehouse">
      <negative tag="minus" format="-$#" />
   </Currency>
   <Currency tag="int:$" type="international" symbol="$" format="$#">
      <negative tag="minus" format="-$#" />
   </Currency>
   <Currency tag="loc:en-GB" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
      <negative tag="minus" format="-$#" />
   </Currency>
</Currencies>

 Customize Analysis Currency Symbol List

This example overrides the list of available currencies in the analysis currency symbol list with a custom list.

Process

Copy the desired currency tags from the currency.xml file. It is not recommended to amend the currency.xml tags. Only int:wrhs should ever be modified.

Sample XML

Copy and paste from this text version of the example to avoid unwanted characters being copied from the browser.

<Currencies>
   <Currency tag="int:wrhs" type="international" placeholder="true" symbol="$" format="$#" digits="2" displayMessage="kmsgCurrencySiebelWarehouse">
      <negative tag="minus" format="-$#" />
   </Currency>
   <Currency tag="int:$" type="international" symbol="$" format="$#">
      <negative tag="minus" format="-$#" />
   </Currency>
   <Currency tag="loc:en-GB" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
      <negative tag="minus" format="-$#" />
   </Currency>
   <Currency tag="none" type="international" symbol="" displayMessage="kmsgCurrencyNone" format="$#" />
</Currencies>

Observations

There appears to be no method to append or edit the default list of analysis currencies. The only option is to replace the list in its entirety with a newly defined list.

Update Currencies XML

Update the "Currencies XML" with the sample XML provided.

Console -> System Settings -> "Currencies XML":

Restart

Restart OBI Presentation Server:

Refresh

Log out and the log back into OAC. This is important for it to refresh.

Results

Go to: Classic Home -> Create or Edit an Analysis  -> Criteria -> Column Properties -> Data Format -> Currency Symbol -> The new list of currencies is available:

 Test Results

In the analysis column properties data format set: Currency Symbol = "User's Preferred Currency"

Test each currency preference. Note that "Default - " is currently set to $. The next chapter will explain how to change the default.

Test $ Dollars:

Test £ English - United Kingdom:

Test (None):

Test Default -:

 Set Default Currency using int:wrhs tag

Two examples are provided showing how to switch "Default -" from US Dollars to British Pounds and No/None currency symbol. The example can be easily adapted to set the default to any desired currency symbol of choice available in OAC.

Process

Copy/paste the element that will become the new default. Paste at the top so it is obvious it has been changed. Replace the tag with tag="int:wrhs". Delete the original tag="int:wrhs element.

Set Default to GB Pounds

Copy and paste from this text version of the example to avoid unwanted characters being copied from the browser.

Follow the steps previously provided to Update the "Currencies XML" with the GB sample XML provided.

<Currencies>
    <Currency tag="int:wrhs" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
    <negative tag="minus" format="-$#" />

</Currency>
    <Currency tag="int:$" type="international" symbol="$" format="$#">
    <negative tag="minus" format="-$#" />
</Currency>
    <Currency tag="loc:en-GB" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
    <negative tag="minus" format="-$#" />
</Currency>
    <Currency tag="none" type="international" symbol="" displayMessage="kmsgCurrencyNone" format="$#" />
</Currencies>

Results

Set Default to No Currency Symbol

Copy and paste from this text version of the example to avoid unwanted characters being copied from the browser.

Follow the steps previously provided to Update the "Currencies XML" with the No/None sample XML provided.

<Currencies>
   <Currency tag="int:wrhs" type="international" symbol="" displayMessage="kmsgCurrencyNone" format="$#" />
</Currency>
   <Currency tag="int:$" type="international" symbol="$" format="$#">
<negative tag="minus" format="-$#" />
</Currency>
   <Currency tag="loc:en-GB" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
   <negative tag="minus" format="-$#" />
</Currency>
   <Currency tag="none" type="international" symbol="" displayMessage="kmsgCurrencyNone" format="$#" />
</Currencies>

Results

 

 Want to Learn More?

Click here for Oracle Analytics Cloud (OAC) Configuring Default Currency Documentation.

Click here for Chapter on "Defining User-Preferred Currency Options" in "Oracle® Fusion Middleware System Administrator's Guide for Oracle Business Intelligence Enterprise Edition".

Click here for documentation on Configuring BI Apps Currencies.

Click here for more A-Team Oracle Analytics (OAC) Blogs.

 Summary

This article walked through the steps to configure Oracle Analytics Cloud (OAC) - Answers (Analysis) Dashboard default currency options. It is not applicable to BI Apps or DV customers. The blog outlined how to set "User Currency Preferences XML" and "Currencies XML". Custom XML code was provided that shows how to modify the list of available currencies in the user account preferences and analysis currency symbol list. Steps are given showing how to set the default currency using the PREFERRED_CURRENCY session variable and by modifying the int:wrhs tag.

Jay Pearson

Consulting Solutions Architect, Business Intelligence


Previous Post

Spoke VCN to Object Storage by using the SGW from the Hub VCN

Andrei Stoian | 4 min read

Next Post


Using AuthorizedKeysCommand on OCI Compute

Kiran Thakkar | 3 min read