Feedback Form

Si Blog

Handling currency conversions

Ok, this one isn't from me, it's from one of our users who wanted to show us how he handled currency conversions with Prism.  Thank you!

I've simplified his scenario, just to get the main point across.  Note that this user was working with Excel files, but this example is just as valid for any data source with similar data.  Remember, as far as Prism is concerned, all data sources were created equal!

Imagine an Excel file with the following data in it:

 

What the user was trying to do is create a simple report that shows total sales for each product.  But the report had to be in Euros, while the data was received in US Dollars.  He was getting these figures on a daily basis, so he was looking for a way to create it in such a way that he only had to change the rate of conversion between Euros and US Dollars to update his report.  He sure wasn't about to create the same report again and again every day.

Calculating Sales in US Dollars

You probably noticed that the Excel sheet does not contain an explicit field for sales.  So the first thing he needed to do was create a Sales In US Dollars measure that is defined by the price of each individual product multiplied by its quantity.  This is easily done by creating a Calculated Measure (more about creating these can be found here):

Defining a Conversion Rate Measure

In order to convert the US Dollars value to Euros, he defined a conversion rate measure.  To do this, he created a Calculated Measure whose formula is the conversion rate (at the time of writing, this value was 0.64):


Calculating Sales in Euros

Finally, to create a Sales in Euros measure, he simply had to create a new Calculated Measure whose formula is as follows:

 

... and viola!  A Sales in Euros measure to use in his reports!  Changing the value of the Conversion Rate formula to the required conversation rate will make sure his report always shows accurate results, without having to repeat any of his work.

I'd like to thank this user again for this nice and useful example.

Elad
SiSense 

Comments

No Comments