Forum Discussion

lync0056's avatar
lync0056
Icon for Helper I rankHelper I
8 years ago
Solved

Last Sale Amount- LASTNONBLANK()

Hi,    I'm trying to calculate the last Sale Amount in a Sales Table. (See screenshot of my model below) My measure is as follows;   Last Sale Amount = CALCULATE( [Total Sales] , LASTNONBLANK( Da...
  • lync0056's avatar
    lync0056
    8 years ago

    I received the solution to this on a different forum. Pasted below.

     

    Last Sales Amount  =
    VAR LastSalesDate = MAX( Invoices[Date] )

    RETURN
    CALCULATE( [Total Sales] ,
    FILTER( ALL( Dates ),
    Dates[Date] = LastSalesDate ))