Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JimB-GA
Helper III
Helper III

how to calculate the lastest value in a time series

I have a simple time series that shows closing stock value by date,  I would like to return the value for the latest date.  In the following sample, the lastest date is 12/12/18 with a value of 271

 

Date	Value
12/12/18	271
12/11/18	261
12/10/18	260
12/07/18	264
12/06/18	274
12/05/18	264
12/04/18	275
12/03/18	266

Thanks!

 

Jim B

1 ACCEPTED SOLUTION
Anonymous
Not applicable

try:

Last Date =
CALCULATE (
    SUM ( Table1[Value] ),
    LASTNONBLANK ( Table1[Date], SUM ( Table1[Value] ) )
)

View solution in original post

2 REPLIES 2
JimB-GA
Helper III
Helper III

Thanks!  Worked like a charm the first time.

Anonymous
Not applicable

try:

Last Date =
CALCULATE (
    SUM ( Table1[Value] ),
    LASTNONBLANK ( Table1[Date], SUM ( Table1[Value] ) )
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.