Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi All,
I'm having an issue trying to calculate converted values using FX rates. In the model I have a base Value in the Booking table which is in a given currency (here, GBP and EUR) (denoted by the currency column), using this value and rates I'm trying to create two measures in the base ($) currency: Value YTD $ and Value ITD $ (Inception to Date).
The date dimension has months and days but the lowest granularity of time will actually be quarters. The currency conversion works as follows:
I have created a simple measure for this:
Value ($) YTD = CALCULATE( TOTALYTD(SUM(Booking[Value]), 'Date'[Date]) * [Rate YTD Average] )
However as you can see in the table below this doesn't work in row totals (it appears as if the average rate across all currencies is taken and not sub calculated per currency then totalled, this is probably a basic fix I know). I did get this working in another model correctly but honestly it looks like a hack and was brute forced.
I think the above is likely easily corrected, the ITD is causing more concern as the logic for the totals are as follows:
So in the table above this would essentially be a running sum from the beginning of time but applying the average rates for each year currency independently. I attempt to do just this but the context is modified by the outer SUM it seems.
Data Model:
PowerBI Template with Dummy Data and Model: Power BI Scaffold
I would greatly appreciate any help with this. I have complete control over the model, before this new exchange rate mechanism came in I was just using lookups and there was no requirement to have a relationship between the exchange table and anything else.
Best Regards,
Kieran
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
16 | |
13 | |
10 | |
8 |
User | Count |
---|---|
59 | |
20 | |
12 | |
11 | |
10 |