Forum Discussion

AskinY's avatar
AskinY
New Member
4 years ago
Solved

USERELATIONSHIP

Hi Everyone,

 

I need to get each Currency Type Parity and multiple the Amount. How can i get the relationship between two tables and create a measure for the USD_Amount calculation? What is the Dax formula?

 

PARITY Table;

CUR_TYPEPARITY
EUR1,15
GBP1,6

 

DATA Table

CUR_TYPEAMOUNT
EUR100
GBP120

 

Thank you

  • Hi AskinY 

    open the the data model tab, click and hold on the the CUR_TYPE column of the PARITY table, drag to the CUR_TYPE column of the DATA table. Make sure the relationship is one to many (PARITY filters DATA). 
    Then create your measure

    USD_Amount =
    SUMX ( DATA, DATA[AMOUNT] * RELATED ( PARITY[PARITY] ) )

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi AskinY 

    open the the data model tab, click and hold on the the CUR_TYPE column of the PARITY table, drag to the CUR_TYPE column of the DATA table. Make sure the relationship is one to many (PARITY filters DATA). 
    Then create your measure

    USD_Amount =
    SUMX ( DATA, DATA[AMOUNT] * RELATED ( PARITY[PARITY] ) )