Constant Currency Analysis (Power BI DAX Tutorial)

Constant currency analysis is very popular when we need to take out FX rate fluctuations from our analysis. There are many different methodologies that companies used for determining what constant FX rate to apply to the historical values. In our tutorial, we will take a look at the time window for our analysis, figure out what the latest exchange rate was for each currency and then restate the entire history using this rate. In other words, if the exchange rate was always the same as what it was on the last day of our time window, what would the trend look like?

You can download the Power BI model used in this tutorial here.

I have created a couple of measures to make testing a bit simpler for you. The process is as follows:

  1. Create a measure Sales LC to calculate sales in local currency
  2. Create a measure Constant Currency Date to allow us to figure out what was the latest date in our FX Rates table that actually had an FX Rate in our time window
  3. use that date to look up the rate for each currency used in our Sales table as we create our Sales USD (CC) calculation (USD Sales using Constant Currency Rate)

Please compare our Constant currency rate measure to the Sales USD measure to see the difference in approaches.

DAX Formulas:

Constant Currency Date = CALCULATE(
		MAX('FX Rate'[Date]),
Constant Currency Rate = 
var cc = [Constant Currency Date]
    MAX('FX Rate'[Fx Rate to USD]),
        ALL('FX Rate'),
        'FX Rate'[Date] = cc
        && 'FX Rate'[Currency] = SELECTEDVALUE('Currency'[Currency])
Sales LC = 
SUM(Sales[LC Amount])
Sales USD = 
VAR vSalesWithFXRate =
        SUMMARIZE (
        "_LC Amount", [Sales LC],
        "_FX Rate to USD", CALCULATE (
            SELECTEDVALUE ( 'FX Rate'[Fx Rate to USD])

    SUMX (
        [_LC Amount] / [_FX Rate to USD]
Sales USD (CC) = 
var ccDate = [Constant Currency Date]
VAR vSalesWithConstantRate = 
	"_LC Amount",
	[Sales LC],
	"_Constant Rate", 
        MAX('FX Rate'[Fx Rate to USD]),
            ALL('FX Rate'),
            'FX Rate'[Date] = ccDate
            && 'FX Rate'[Currency] = SELECTEDVALUE('Currency'[Currency])
RETURN SUMX(vSalesWithConstantRate, [_LC Amount]/[_Constant Rate])

2 thoughts on “Constant Currency Analysis (Power BI DAX Tutorial)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s