Forum Discussion
lync0056
Helper I
8 years agoLast 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...
- 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 ))
lync0056
Helper I
8 years agoIt is not possible to create a direct relationship between the Invoices table and Sales Table. Indirectly there is a pointer from Sales to Journals and then Journals to Invoices.
lync0056
Helper I
8 years agoI 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 ))