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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Averaging Exchange Rates for each Currency in a Custom Column

Hi,

 

I'm really hoping someone can help me here.

 

I have an Exchange Rate table which lists the currency rate for each currency  on a daily basis for a GBP conversion. This table links into the Orders table which holds the transactions which come in many currencies.

 

I now need to create an Exchange Average table to link into the Product Inventory table which lists all the products we have and the cost for each product in its native currency but there are no dates I can lookup against for each currency and the cost in this table needs to be converted into GBP.

 

In the Exchange Average table I have managed to get a distinct list of currencies e.g USD, EUR etc using the Exchange Rate table, and now I need to get the average exchange rate for each currency into a seperate column.

 

I currently have something like this below but it's bringing back the same figure for each currency, I need to be able to say look at USD in the Exchange Rate table and then Average the values in that column: 

 

Average Rate = AVERAGE('Exchange rates' [Units per GBP])

 

 

Would anyone know how this can be done? 

 

Many Thanks

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

You need to use and Aggregator formula in this case AVERAGEX. This will calculate the average based on each line of your table, you should use something similar to this:

Average Rate = AVERAGEX('Exchange rates', 'Exchange rates' [Units per GBP])

 

Be aware that this may not fit your model. If you need more assistance can you share a sample of your data please.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@Anonymous 

 

maybe you can try below DAX

Average Rate = calculate(AVERAGE('Exchange rates' [Units per GBP]),allexecpt('Exchange rates','Exchange rates'[currency]))

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




MFelix
Super User
Super User

Hi @Anonymous ,

 

You need to use and Aggregator formula in this case AVERAGEX. This will calculate the average based on each line of your table, you should use something similar to this:

Average Rate = AVERAGEX('Exchange rates', 'Exchange rates' [Units per GBP])

 

Be aware that this may not fit your model. If you need more assistance can you share a sample of your data please.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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