Forum Discussion
Find max date less than slicer selected date
- 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
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
amitchandak thank you for this suggestion! It certainly seems like it should work, but when I applied it to my scenario it did not. I don't get an error with the measure, but when inserted in the table, the column is blank. Any idea why?