Forum Discussion

Will2020's avatar
Will2020
Frequent Visitor
6 years ago
Solved

Latest currency conversion from other table

I have a table as above called vwConversion which shows conversion rates between USD and other global currencies. There is one conversion rate per year produced on 01/10.  There are multiple o...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Will2020 ,

    Please try to create a calcualted table as below, then create the relationship between new created table and vwRevenues based on currency field.

    Table = 
    SUMMARIZE (
        VALUES ( vwConversion[FROM_CURRENCY] ),
        'vwConversion'[FROM_CURRENCY],
        "LatestConversionRate", CALCULATE (
            MAX ( 'vwConversion'[CONVERSION_RATE] ),
            FILTER (
                ALLSELECTED ( 'vwConversion'[CONVERSION_DATE] ),
                'vwConversion'[CONVERSION_DATE] = MAX ( 'vwConversion'[CONVERSION_DATE] )
            )
        )
    )

    Best Regards

    Rena