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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
unemployer
Frequent Visitor

Exchange Rate total is wrong

hey there.

I have a table of sales with different currencies, and I made a measure to convert the sales to my desired currency.

the issue is when I view the total it's not correct and I have no idea why.

here is the sales table:

pnr.PNG

here is the total, which is wrong

pnr totals.PNG

here is the measure that calculates the currency exchange

the currency table is just a table that gives me the exchange rate for my currency.

Revenue in SAR = 
VAR    
    _currency= MAX('Backend Revenue'[Currency])
VAR
    _cinversionRate= 
        CALCULATE(
            MAX('Currency'[SAR per unit])
            , 'Currency'[Currency]=_currency
        )
VAR
    _unitPriceSAR=
         SUM('Backend Revenue'[Value])* _cinversionRate 
RETURN
    _unitPriceSAR  

 

 

 

1 ACCEPTED SOLUTION

Hi,

I am not sure whether the below is what you are looking for, but please check if it suits your requirement.

 

Jihwan_Kim_0-1716108277975.png

 

 

 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

7 REPLIES 7
Jihwan_Kim
Super User
Super User

Hi,

I do not know how your semantic model looks like, but please try something like below whether it suits your requirement.

 

Revenue in SAR =
VAR _unitPriceSAR =
    SUMX (
        VALUES ( 'Currency'[Currency] ),
        CALCULATE ( SUM ( 'Backend Revenue'[Value] ) )
            * CALCULATE (
                MAX ( 'Currency'[SAR per unit] ),
                'Currency'[Currency] = MAX ( 'Backend Revenue'[Currency] )
            )
    )
RETURN
    _unitPriceSAR

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

same thingsaaaa.PNG

Hi @unemployer , 

If you don't mind, could I ask the following questions?  Does your fact table have the currency column? In that case, are you using the physical relationship between your currency field in your fact table with the exchange rates table?  Also, exchange rates tends to be reevaluated for different time periods typically every month, and in this case, combination of your fact table currency field with the month information may need to be linked with the currency and month concatenated information in the currency table, I thought. 

DataNinja777_0-1716107868751.png

Multiplication or division depends on how the currency pair is denominated in your particular currency table data. 

Best regards,

 

Hi,

Please share your sample pbix file's link, and then I can try to look into it.

 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

sure, here is the sample data

sample 

Hi,

I am not sure whether the below is what you are looking for, but please check if it suits your requirement.

 

Jihwan_Kim_0-1716108277975.png

 

 

 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

you are a legend

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors