Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Calculating Values with FX Rates from different periods

$
0
0

Good morning

 

I'm struggling with finding a solution for calculating with currency rates – so far tried almost everything, but I guess, this can be done with DAX measures only.

Would be great, if someone has an approach for me.

 

I have a table with values in CHF, which is always filtered to YTD. Our controllers want to calculate the deviation of the value of the previous year to the actual year using local currency.

The problem I had so far is, that the origin system is calculating with average rates in local currency. I get this average in my currency file.

 

Table with values is 'COG', the table for currency is 'FX' and I use a date table 'DATE' where our FY is available (April-March). For the calculation, I need to take the average rate for each currency from the "last month" only, and multiply this with the same value I had in the same month on year ago. This means, I have to calculate the following:

 

'COG' [Value] /   'FX' "last month of actual FY"  *  'FX' "last month of previous FY"

 

The problem I have:

When the filter on 'COG' Value is on April-November 2016, I need to calculate the sum, divide it with FX value of November 2016 multiplied with November 2015 – but as soon as I filter for April-November, or YTD over the 'DATE' table', also the 'FX' table is filtered. So I disconnected the 'FX' table from 'DATE', made a copy and renamed it to 'FXACT' and 'FXPY'

 

'COG' [Value] /   'FX' "November 2016"  *  'FX' "November 2015"

 

Now I have to pack this into a DAX formula – guess I need to use "previousmonth" function and "previousmonth" in combination with "sameperiodelastyear" – but I don't know how…

 

Does someone can help me with this?

 

Regards Patrick


Viewing all articles
Browse latest Browse all 213819

Trending Articles