TotSales = /* Does not work if filtering using a pre-existing measure called [EndOfWeekDate] */ /*var FilteredTable = FILTER('Sales', 'Sales'[CYDate] < [EndOfWeekDate])*/ /* But it works if I hard code a date */ var FilteredTable = FILTER('Sales', 'Sales'[CYDate] < DATE(2024,17,7)) RETURN IF( SUM('Sales'[Sales]) = 0, BLANK(), CALCULATE (SUM('Sales'[Sales]), FilteredTable) )
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)