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
I need help to calculate sales in USD and Peso based on the exchange rate in Table 2.
Thanks
Faizan Rao
Solved! Go to Solution.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hey @FaizanRao ,
as calculated column something like this should do it:
Sales in USD =
VAR vInvoiceDateCurrentRow = 'Table 1'[Invoice Date]
VAR vCurrencyCurrentRow = 'Table 1'[Sales Currency]
VAR vExchangeRate =
CALCULATE(
MAX( 'Table 2'[Exchange Rate] ),
'Table 2'[Currency From] = vCurrencyCurrentRow
&& 'Table 2'[Currency To] = "USD"
&& 'Table 2'[Date From] <= vInvoiceDateCurrentRow
&& 'Table 2'[Date To] >= vInvoiceDateCurrentRow
)
RETURN
'Table 1'[Sales Value] * vExchangeRate
Hi Denis
Thanks for your prompt reply but still need your help to fix the following error.
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 |
---|---|
110 | |
95 | |
86 | |
78 | |
66 |
User | Count |
---|---|
157 | |
125 | |
116 | |
111 | |
95 |