March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a table like the below
Currency_Code | Starting_Date | Monthly Average Conversion Rate to GBP |
AED | 01/11/2023 00:00 | 4.553310714 |
AED | 01/10/2023 00:00 | 4.469232258 |
AED | 01/09/2023 00:00 | 4.552056667 |
GBP | 01/11/2023 00:00 | 1 |
GBP | 01/10/2023 00:00 | 1 |
GBP | 01/09/2023 00:00 | 1 |
AUD | 01/11/2023 00:00 | 1.911332143 |
AUD | 01/10/2023 00:00 | 1.916648387 |
AUD | 01/09/2023 00:00 | 1.928933333 |
EUR | 01/11/2023 00:00 | 1.147792857 |
EUR | 01/10/2023 00:00 | 1.151916129 |
EUR | 01/09/2023 00:00 | 1.160366667 |
SGD | 01/11/2023 00:00 | 1.673132143 |
SGD | 01/10/2023 00:00 | 1.665458065 |
SGD | 01/09/2023 00:00 | 1.688866667 |
USD | 01/11/2023 00:00 | 1.239860714 |
USD | 01/10/2023 00:00 | 1.216941935 |
USD | 01/09/2023 00:00 | 1.23949 |
I'm trying without luck to create a calculated column that would take the monthly to gbp rate and divide it by the monthly rate for USD within the relevant month, trying to do this without the "Calculate" funtion as I know that can cause performance issues. This would allow me to get the direct conversion for each into USD.
My table has been simplified for this question. The actual table would contain rates for each day throughout a month.
Solved! Go to Solution.
Try this calculated column:
GBP/USD Rate =
VAR vStartingDate = 'Currency'[Starting_Date]
VAR vUSDRate =
MAXX (
FILTER (
'Currency',
'Currency'[Currency_Code] = "USD"
&& 'Currency'[Starting_Date] = vStartingDate
),
'Currency'[Monthly Average Conversion Rate to GBP]
)
VAR vResult =
DIVIDE ( 'Currency'[Monthly Average Conversion Rate to GBP], vUSDRate )
RETURN
vResult
Proud to be a Super User!
Try this calculated column:
GBP/USD Rate =
VAR vStartingDate = 'Currency'[Starting_Date]
VAR vUSDRate =
MAXX (
FILTER (
'Currency',
'Currency'[Currency_Code] = "USD"
&& 'Currency'[Starting_Date] = vStartingDate
),
'Currency'[Monthly Average Conversion Rate to GBP]
)
VAR vResult =
DIVIDE ( 'Currency'[Monthly Average Conversion Rate to GBP], vUSDRate )
RETURN
vResult
Proud to be a Super User!
Thank you very much!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |