Forum Discussion

ngct1112's avatar
ngct1112
Icon for Post Patron rankPost Patron
6 years ago
Solved

How to SUMX value with Fixed Exchange%

I am looking for help for with the problem I still could not fix.   I am trying to SUMX the total value with exchange rate, in accordance with DATE. Refer to the FX table, In this case, the total ...
  • v-kelly-msft's avatar
    v-kelly-msft
    6 years ago

    Hi  ngct1112 ,

     

    Sorry for the late reply!

    Create 2 measures as below:

    Measure 2 = 
    var _maxdate=TOPN(1,FILTER('FX table','FX table'[Delivery Date]<=MAX('Table'[Delivery Date])),'FX table'[Delivery Date],DESC)
    Return
    SUMX(_maxdate,[Exchange Rate])*CALCULATE(SUM('Table'[Sales Price]))
    Measure 3 = SUMX('Table',[Measure 2])

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!