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
gayle_t
Regular Visitor

Sumx and currency conversion doesnt return correct results

Hi

Trying to do a simple currency conversion of a measure.

 

Measure_Convert := sumx(Data_all, DIVIDE([TotalRevenue], [Exchange Rate])

 

TotalRevenue is measure that uses calculate with a few conditions. (in different currencies)

Exchange Rate is a calculated column with the following formula: (Returns 1 if there is no relevant rate, as only certain rows require conversion)

if(RELATED('Exchange Rates'[Rate])=0,1,RELATED('Exchange Rates'[Rate])))

 

The results seem to be working, however i have some results that show me a weird conversion rate.

Eg: 0.998, 0.996. 

I only expect to see 2 conversion rates, 1 or 2.5 

 

What would an alternative or the simplest way to convert a measure to a common currency? 

 

 

 

 

3 REPLIES 3
v-haibl-msft
Employee
Employee

@gayle_t

 

As BhaveshPatel said, you’d better post snapshot of your data model and sample data. I tested with following two simple tables (“Data_all” and “Exchange_Rates” have relationship with “ID” key) and didn’t experience the problem you mentioned above.

 

Sumx and currency conversion doesnt return correct results_1.jpg

 

Best Regards,

Herbert

Thanks @v-haibl-msft and @BhaveshPatel

 

Unfortunately my data is confidential, dont think i can post here. I would need to randomise the data and see whether the issue still persists.

 

I will post the data model and samples soon.

BhaveshPatel
Community Champion
Community Champion

Seems like you are taking a wrong approach. It would be better if you can post snapshot of your datamodel and sample data.

 

 

Thanks & Regards,

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

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.