Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

LastDate minus 1

I need a filter for (Last Business Day).  We are open Monday through Friday and have hundreds of transaction each day.  One of my sales tabs is "Today's Sales".  I use the "LastDate" formula to displ...
  • donsvensen's avatar
    10 years ago

    Hi Usates,

     

    If you have a date table the you should use the DAX function DateAdd

     

    or the workaround could be

     

    YesterDay Sales = CALCULATE(SUM(Sales[SalesValue]);DATESBETWEEN(Sales[ShipDate];LASTDATE(SALES[ShipDate])-1;LASTDATE(SALES[ShipDate])-1))

     

    br

    Erik