Forum Discussion
Anonymous
2 years agoNot applicable
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:
here is the total, which is wrong
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
Hi,
I am not sure whether the below is what you are looking for, but please check if it suits your requirement.
7 Replies
- Jihwan_KimSuper 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- AnonymousNot applicable
same thing
- Jihwan_KimSuper User
Hi,
Please share your sample pbix file's link, and then I can try to look into it.