Forum Discussion

KevBI's avatar
KevBI
Helper I
4 years ago

Total doesn't calculate correctly

Hello Guys,

 

I have a simple Measure that retrieves the Exchange Rates per Currency, that works prefectly.

When trying to calculate the price (Net Value) to EUR with the exchange Rate it also works fine!

The only problem i have, is that the Totals aren't correct, I have never seen something like that.

_NetPriceInEUR = SUM('EKPO (3)'[Net Price]) / [_ExchangeRate]

and im also including the Exchange Rate Measure, even tho im sure that it is correct, because im using it in other Measure and it is working perfectly.

_ExchangeRate =
VAR
_currency = max(EKBE[Crcy])
VAR
_conversionRate =
CALCULATE(
MAX( 'exch rate AOP 2022'[Exchange Rate])
, 'exch rate AOP 2022'[Currency] = _currency
)

RETURN
_conversionRate


Thank you for the Help!

3 Replies

  • KevBI ,

    _ExchangeRate =
    VAR
    _currency = max(EKBE[Crcy])
    VAR
    _conversionRate =
    Sumx(Values(Table[Dco Number]) , CALCULATE(
    MAX( 'exch rate AOP 2022'[Exchange Rate])
    , 'exch rate AOP 2022'[Currency] = _currency
    ))

    RETURN
    _conversionRate

  • Hi KevBI ,

    Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

    Best Regards,
    Community Support Team _ kalyj

  • amitchandak  Hello amitchandak, Thank you very much for the help!!

    what do you mean by Table[Dco Number] ?