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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shantanu97
Helper I
Helper I

Re:- Translate AUD & GBP currency into USD

I have a data in which sales data have a value column, also have a base currency value column in which it mentions which currency it is (AUD,GBP,USD). Want to make one column where it converted AUD & GBP to USD. 

 

One more dataset is given - exchange rate where every required date have currency exchange from AUD,GBP to USD.

 

Can anyone help me to convert column into USD. I am facing problem in writing DAX column query. I am new to Power BI.

 

Excel and .pbix file : All Required File found here 

shantanu97_0-1595741280713.png

Sales Data                                                                          

 

shantanu97_0-1595741433630.png

Currency Exchange Data

2 ACCEPTED SOLUTIONS
nandukrishnavs
Super User
Super User

@shantanu97 

 

Try below DAX in a calculated column.

 

Currency Conversion to USD = 
VAR __baseCurrency = 'Sales Data'[BaseCurrency]
VAR __audTousdRate =
    LOOKUPVALUE (
        'Exchange Rates'[Rate to AUD/USD],
        'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
    )
VAR __gbpTousdRate =
    LOOKUPVALUE (
        'Exchange Rates'[Rate to GBP/USD],
        'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
    )
VAR __result =
    SWITCH (
        __baseCurrency,
        "GBP", 'Sales Data'[Value] * __gbpTousdRate,
        "AUD", 'Sales Data'[Value] * __audTousdRate,
        'Sales Data'[Value]
    )
RETURN
    __result

 

 

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

View solution in original post

FrankAT
Community Champion
Community Champion

Hi @shantanu97 ,

take a look at the following solution:

 

26-07-_2020_13-04-42.png

 

Regards FrankAT

View solution in original post

3 REPLIES 3
FrankAT
Community Champion
Community Champion

Hi @shantanu97 ,

take a look at the following solution:

 

26-07-_2020_13-04-42.png

 

Regards FrankAT

nandukrishnavs
Super User
Super User

@shantanu97 

 

Try below DAX in a calculated column.

 

Currency Conversion to USD = 
VAR __baseCurrency = 'Sales Data'[BaseCurrency]
VAR __audTousdRate =
    LOOKUPVALUE (
        'Exchange Rates'[Rate to AUD/USD],
        'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
    )
VAR __gbpTousdRate =
    LOOKUPVALUE (
        'Exchange Rates'[Rate to GBP/USD],
        'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
    )
VAR __result =
    SWITCH (
        __baseCurrency,
        "GBP", 'Sales Data'[Value] * __gbpTousdRate,
        "AUD", 'Sales Data'[Value] * __audTousdRate,
        'Sales Data'[Value]
    )
RETURN
    __result

 

 

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.