Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
78 | |
59 | |
51 |
User | Count |
---|---|
165 | |
83 | |
68 | |
68 | |
59 |