Forum Discussion
Exchange Rate total is wrong
- 2 years ago
Hi,
I am not sure whether the below is what you are looking for, but please check if it suits your requirement.
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
same thing
- Jihwan_Kim2 years agoSuper User
Hi,
Please share your sample pbix file's link, and then I can try to look into it.
- Anonymous2 years agoNot applicable
sure, here is the sample data
- Jihwan_Kim2 years agoSuper User
Hi,
I am not sure whether the below is what you are looking for, but please check if it suits your requirement.
- DataNinja7772 years agoSuper User
Hi Anonymous ,
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.
Multiplication or division depends on how the currency pair is denominated in your particular currency table data.
Best regards,