Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
IngoH
Active Contributor
Some of you might have the need to create a currency conversion in SAP Analytics Cloud because the backend doesn't provide all the required information. In such a scenario we can easily create a Currency Translation table in SAP Analytics Cloud and then leverage the information to allow for a Currency Conversion in our stories.

For SAP Analytics Cloud to be able to provide the ability to translate data from one currency to another, you will have to configure the source currency in your data, as well as you will have to setup the Currency Translation table with the details on the valid period and the translation details.

For our example we will use a relatively simple data set and we will configure the source currency in the model in SAP Analytics Cloud.

You can download the source file for this exercise following this URL:

https://sapanalyticscloudbook.com/sample-stories and the file name is
Mastering_SAP_Analytics_Cloud_chapter09_DataSource004.xlsx

Our source data contains a dimension for an Order ID, an Order Date, a dimension for the Country, and a dimension for the Currency as well as a measure for the Order Value.



Figure 1: Source Data

Now lets create the necessary model.

  1. Logon to your SAP Analytics Cloud tenant.

  2. Navigate to the Home menu.

  3. Select the menu Create Model.

  4. Select the option Import a file from your computer.

  5. Click Select Source File.

  6. Point to the downloaded file for this exercise.

  7. Ensure the option Use first row as column headers is enabled.

  8. Click Import.




Figure 2: Imported Data

  1. Select the column header for Order Date.

  2. Ensure the Type is set to Date Dimension and the Date Format is set to MM/DD/YYYY.

  3. Ensure the Order ID column is configured as Generic Dimension.

  4. Select the column header for column Country.

  5. Set the Type to Organization.

  6. Click Add Dimension Attributes.

  7. Select the option Currency.

  8. Select column Currency as the Currency Attribute.

  9. Select the column header for Order Value.

  10. Ensure Order Value is configured as Measure.

  11. Click Create Model (bottom right).

  12. Confirm the message by clicking Create.

  13. You will be asked to select a folder.

  14. Select a folder, enter a name and description.

  15. Click OK.




Figure 3: Data Management

  1. Use the disk symbol in the General menu to save the changes.

  2. Navigate to the Home menu.

  3. Select the menu Create • Currency.

  4. Select the option New Currency Conversion Table.

  5. Enter CurrencySample as Name and Description.

  6. Click Create.


 

Our sample data has values for January 2019 to July 2019 for the currencies USD, EUR, and CAD. Our Currency Translation table will need to have entries to cover the timeline as well as those currencies as source and target currencies.

 

  1. Enter the following entries:















































Source Currency Valid From Target Currency Exchange Rate
USD 2019.01.01 EUR 0.88
USD 2019.01.01 CAD 1.31
EUR 2019.01.01 USD 1.14
EUR 2019.01.01 CAD 1.49
CAD 2019.01.01 EUR 0.67
CAD 2019.01.01 USD 0.76

Table 1: Currency Translation

  1. Use the disk symbol in the toolbar to save the changes.

  2. Navigate to the Home menu.

  3. Select the menu Browse Files.

  4. Navigate to the folder where you saved the previously created model.

  5. Open the model.

  6. Select the option Model (top left).

  7. Navigate to the General menu in the toolbar.




Figure 4: Menu General

  1. Open the Model Preferences.

  2. Navigate to the area Currency.




Figure 5: Currency Preferences

  1. Enable the option Currency Conversion.

  2. Ensure the Currency Dimension is set to Country.

  3. Set the Currency Rates Table to the CurrencySample table.

  4. Set the Date Dimension to Order Date.

  5. Click OK.

  6. Save the changes to the model.

  7. Select the option Model (top left).

  8. Now click on the Account dimension.

  9. Select the entry Order Value.

  10. In the Details panel on the right-hand side scroll down to the area Formatting.

  11. Ensure the option Units & Currencies is set to Currency.




Figure 6: Formatting

  1. Navigate to the menu General

  2. Save the changes to the model.


 

In the last few steps we create a model and uploaded data with values for three different currencies. We also created a currency translation table and enabled the currency conversion in the model. We have now all the information, so that we can create a story in the next set of steps and use the newly modeled information.
9 Comments