Forum Discussion

Leski's avatar
Leski
Frequent Visitor
6 years ago
Solved

Measure multiplying the data from the two tables

Hello

I'm begining with DAX and I try to create new measure with calculete price in euro; price in local currency from first table [sales] and currency form second [Currency].

Of course, the tables are connected in the model by the currency symbol column.

I can make join and add column with currrency in Sales table, but the better way is try to use measure. 

 

In excel loos like: Price in Euro = [sales]'Price in local currency' * xlookup([sales]"currency local" ; [Currency]"currency"; [Currency]"Ratio_EUR")

  • Try something like:

     

    = SUMX ( Sales, Sales[PriceInLocalCurrency Column] * RELATED ( Currency[Currency Column] ) )

     

2 Replies

  • AntrikshSharma's avatar
    AntrikshSharma
    Icon for Community Champion rankCommunity Champion

    Try something like:

     

    = SUMX ( Sales, Sales[PriceInLocalCurrency Column] * RELATED ( Currency[Currency Column] ) )

     

    • Leski's avatar
      Leski
      Frequent Visitor

      Thank you, works great.