Forum Discussion

karabryan's avatar
karabryan
Helper I
5 years ago
Solved

Condition Statement

I've seen many examples of how to handle currency but our company only wants the exchange rate to apply if the source currency is RMB.  Then it should be converted to USD.  The rest of the transactio...
  • v-deddai1-msft's avatar
    v-deddai1-msft
    5 years ago

    Hello @karabryan ,

    Could you please try to use firstnonblank in your formula like:

    LOOKUPVALUE(
        FIRSTNONBLANK(Currency[NewRate],1),
        Currency[NewSourceTarget],
        Booking[NewSourceTarget]
        Currency[Date],
        Booking[Date]
    )

    If this post helps, then consider Accept it as the solution to help other members find it faster.

    Best regards

    Dedmon Dai

  • MFelix's avatar
    MFelix
    5 years ago

    Hi karabryan ,

     

    In order to have a more permanent solution believe you need to do the following:

    • Create a measure with the following code:

     

    ExchangeRate = MIN(ExchangeRateTable[ExchangeRate])

     

    • Now create a new measure to make the calculation:

     

    Valueconverted = SUMX(Table, Table[Amount] * [ExchangeRate])

     

    Be aware that you need to have the columns from your many-to-1 relationship from the oneside on the visualization.

     

    You SUMX table need to be adjusted to your model.

     

    this is just a generic solution needs to be adjusted to your model and needs.