Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The 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.

Reply
Syndicate_Admin
Administrator
Administrator

Currency Exchange Rate

Dear:

Thank you in advance for the support you can give me, I have to show the sales information in local currency and in usd, but as we know the exchange rate is variable in a period of time, so the rate I have in a table called, exchange rate, which has a beginning and end of validity, as well as the exchange factor, and in the second table I have the sale on a certain date, to which I want to add a column that is USD, which would be the sale between the exchange factor on the given date.

Attached the link

jminanoc_1-1653750287585.png

jminanoc_2-1653750397734.png

https://drive.google.com/file/d/1U73OKoiQ6VDHgQLEjjAIyI1_8fwFFOLR/view?usp=sharing

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Syndicate_Admin 

 

You can try the following methods.

Column:

USD = 
CALCULATE (
    MAX ( TipoCambio[Valor] ),
    FILTER (
        TipoCambio,
        [Desde] <= EARLIER ( Venta[Fecha] )
            && [Hasta] >= EARLIER ( Venta[Fecha] )
    )
) * [Venta]

vzhangti_1-1653982549477.png

Is this the output you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Syndicate_Admin 

 

You can try the following methods.

Column:

USD = 
CALCULATE (
    MAX ( TipoCambio[Valor] ),
    FILTER (
        TipoCambio,
        [Desde] <= EARLIER ( Venta[Fecha] )
            && [Hasta] >= EARLIER ( Venta[Fecha] )
    )
) * [Venta]

vzhangti_1-1653982549477.png

Is this the output you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Please find the measure to find the rate

JamesFr06_0-1653752701611.png

Rate =
var validdate=selectedvalue(Venta[Fecha])
var result=calculate(max(TipoCambio[Valor]),validdate>=TipoCambio[Desde]&&validdate<=TipoCambio[Hasta])
return
result

Thank you very much, it's exactly what I needed.

Best regards

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!