Forum Discussion
KevBI
4 years agoHelper I
Need help with Measure
Hello PowerBI Professionals! I have 2 Measures that seem to work individually, but combined they somehow don't show the values they should. First Measure is: _AmountInEUR = VAR __BASELI...
KevBI
4 years agoHelper I
Trying to add the Data like that because I can't upload the Report.
| WBS Element | Inv. Category | PO Number | Amount in local Currency | Exchange Rate | Amount in € | Invoices |
| WPO21P0003.020 | CAPEX | 6300091034 | 6551097.42 | 4.3 | 1523511,03 | 507837,01 |
Amount in Local Currency = This is the Base Value that should get calculated to €
Exchange Rate = This is the Exchange Rate that always gives the correct Rate, 4.3 in this example
(as this is the correct value that gets put out, the problem has to be in this Measure:
Invoice =
VAR __BASELINE_VALUE = CALCULATE(SUMX('EKBE', EKBE[Amt.in loc.cur.])*2, 'EKBE'[Debit/Credit ind] IN { "H" })
VAR __MEASURE_VALUE = SUMX('EKBE', EKBE[Amt.in loc.cur.])
RETURN
IF(NOT ISBLANK(__MEASURE_VALUE), (__MEASURE_VALUE - __BASELINE_VALUE) / [_ExchangeRate])
If I try to leave the divide by [_ExchangeRate]) out, I get the correct value out of the previous Measure.
The only thing that is not working is the calculation with Exchange Rate (so divided by 4.3 in this case).
If I try to divide in another Measure with [_ExchangeRate]), it also calculates correctly, like in this case ->
_AmountIn(€)SUM = SUMX(EKBE, [Amount in Local Currency]) / EKBE[_ExchangeRate]
I hope this is enough data.
If I try to leave the divide by [_ExchangeRate]) out, I get the correct value out of the previous Measure.
The only thing that is not working is the calculation with Exchange Rate (so divided by 4.3 in this case).
If I try to divide in another Measure with [_ExchangeRate]), it also calculates correctly, like in this case ->
_AmountIn(€)SUM = SUMX(EKBE, [Amount in Local Currency]) / EKBE[_ExchangeRate]
I hope this is enough data.