Forum Discussion

Olha_Tseniukh19's avatar
Olha_Tseniukh19
New Member
1 year ago
Solved

Power bi( currency)

Dear all, could you please support me with one question . I have two separated tables in Power BI. In one I have product amounts for each county in local currency. In another table I have currency ra...
  • Poojara_D12's avatar
    1 year ago

    Hi Olha_Tseniukh19 

    The issue arises because your formula may be encountering missing or zero values in the currency rate or mismatched relationships. Here's a simplified solution:

    • Ensure the relationship between the tables (on the Country column) is correctly set up as one-to-many.U
    • se this formula for a calculated column in the first table:

     

    Sum_in_EUR = 
    'FirstTable'[AmountLocal] * RELATED('SecondTable'[CurrencyRate])​

     

    • The RELATED function pulls the matching CurrencyRate for each country.

    • Handle missing or zero currency rates to avoid errors:

     

    Sum_in_EUR = 
    IF(
        ISBLANK(RELATED('SecondTable'[CurrencyRate])) || RELATED('SecondTable'[CurrencyRate]) = 0,
        BLANK(),
        'FirstTable'[AmountLocal] * RELATED('SecondTable'[CurrencyRate])
    )

     

    • Double-check that Country values match perfectly between tables (no typos or extra spaces).

    Did I answer your question? Mark my post as a solution, this will help others!

    If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

    Kind Regards,
    Poojara
    Data Analyst | MSBI Developer | Power BI Consultant
    Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS