Forum Discussion

StaceyG's avatar
StaceyG
Icon for Helper I rankHelper I
4 years ago
Solved

Find max date less than slicer selected date

I feel like this should be really easy, but have spent many hours trying every possible solution I've seen, and none have worked.   I have a date table including Date, MonthEndDate, OneMonthPrior, ...
  • amitchandak's avatar
    4 years ago

    StaceyG , try like

     

    VAR PriorMonthEndDate = eomonth(SELECTEDVALUE('Date'[MonthEndDate])-1)
    VAR TotalTrx = CALCULATE(SUM(Transactions[Total Trx]), FILTER('Transactions', 'Transactions'[MonthEndDate]=PriorMonthEndDate ))

     

    selectvalue will work in measure, it will not work in new column