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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper III
Helper III

A measure for showing the latest value in a date range

In my data (which is on a daily basis), I have a field which is a cumulative sum. So when viewing the data, we care more about viewing the "current level" of the data. 


So for example, if I wanted to look at the data on a daily basis, I would just display the data upfront. 


However, if I were to look at the data on a weekly basis, then I would only want to see the level of the data on Sundays. If monthly, I would want to see the level on the last day of the month. For yearly, obviously the level at Dec 31. 


The best way I assume to implement this would be to have a measure that would dynamically select the latest date available in the selected data range and then return the associated value. Attached below is the kind of visualization we hope to use, so creating a measure for each date breakdown (ex. one measure for weekly, one measure for monthly) isn't really feasible. 



Super User
Super User

@DaxPadawan ,


calculate(lastnonblankvalue(Date[Date]), [Measure])


refer closingbalancemonth 

Power BI closingbalancemonth closingbalancequarter closingbalanceyear, lastnonblankvalue- Closing Balance, Distibutre Target:

Helpful resources


Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.