cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
kasiaw29
Resolver II
Resolver II

Get currency exchange rate per each quarter within dataset

Hi all,

 

I've been going around in circles with SUMMARIZE, GROUP BY with no effect. Here's my problem:

I have a currency exchange rate table with the following columns: Currency Code, Currency Rate, Valid From, Qtr

kasiaw29_2-1686297747232.png

 

Above data is entered by my finance dept. on a monthly basis into our source system. I'm retrieving all of it but I need to find out what the currency rate was at the end of each Qtr, so the ideal output (probably as a new table) would look like:

Currency CodeCurrency RateValid From
AUD1.77725401/12/2022
BRL6.33240601/12/2022
EUR1.16922201/12/2022
USD1.23157501/12/2022
ZAR20.18480801/12/2022
AUD1.79081101/03/2023
BRL6.26821401/03/2023
EUR1.1350901/03/2023
USD1.223401/03/2023
ZAR21.81242101/03/2023
CNY8.36898201/03/2023

 

I usually try to solve things as much as I can on my own before turning to the community. I could really appreciate someone shining some light on this, I must be missing something. 

 

 

1 ACCEPTED SOLUTION
kasiaw29
Resolver II
Resolver II

I managed to fix my own problem by using the following 

Quarterly Rates = SUMMARIZE(
    'IFS Currency Exchange Rates',
    'IFS Currency Exchange Rates'[CURRENCY_CODE],
    'IFS Currency Exchange Rates'[Qtr],
    "Max Date",
    MAX('IFS Currency Exchange Rates'[VALID_FROM]),
    "Rates",
     LOOKUPVALUE('IFS Currency Exchange Rates'[CURRENCY_RATE],
            'IFS Currency Exchange Rates'[VALID_FROM],
             MAX('IFS Currency Exchange Rates'[VALID_FROM]),
            'IFS Currency Exchange Rates'[CURRENCY_CODE],
            'IFS Currency Exchange Rates'[CURRENCY_CODE])) 

kasiaw29_1-1686305108420.png

 

 

View solution in original post

1 REPLY 1
kasiaw29
Resolver II
Resolver II

I managed to fix my own problem by using the following 

Quarterly Rates = SUMMARIZE(
    'IFS Currency Exchange Rates',
    'IFS Currency Exchange Rates'[CURRENCY_CODE],
    'IFS Currency Exchange Rates'[Qtr],
    "Max Date",
    MAX('IFS Currency Exchange Rates'[VALID_FROM]),
    "Rates",
     LOOKUPVALUE('IFS Currency Exchange Rates'[CURRENCY_RATE],
            'IFS Currency Exchange Rates'[VALID_FROM],
             MAX('IFS Currency Exchange Rates'[VALID_FROM]),
            'IFS Currency Exchange Rates'[CURRENCY_CODE],
            'IFS Currency Exchange Rates'[CURRENCY_CODE])) 

kasiaw29_1-1686305108420.png

 

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors