Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
Solved! Go to Solution.
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
Proud to be a Super User!
Check out my blog: Power BI em Português@Anonymous
maybe you can try below DAX
Average Rate = calculate(AVERAGE('Exchange rates' [Units per GBP]),allexecpt('Exchange rates','Exchange rates'[currency]))
Proud to be a 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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |