Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Counting Fiscal YTD and Last Fiscal YTD till latest month in the dataset

Hello all,


My dataset is showing sales and the date column in it is based only on months and years. The last data I have in it is from April 2022.


The other important thing is that Fiscal Year for my dataset is ending on 31/10.


I wanted to create a Fiscal YTD measure and it kind of works, I ve used the TOTALYTD formula but I believe it takes the date till today. The problem is I want to have also Last Fiscal YTD but till the last month in the dataset (in my case April, so from November 2020 till April 2021) and in all of my tries it was counting it till today date (-1 year). 


How can I make it to count only till the latest entry in the dataset and change automatically when I load data in future months?


All help would be appreciated, thanks in advance 🙂

Memorable Member
Memorable Member

Hi @mzienowicz99,


Let's say you have a measure [TotalYTD] which works perfectly fine but you want it to consider dates only till the last entry and not today. You can use:


Till Last Entry = CALCULATE([TotalYTD],FILTER('Table','Table'[Date]<=MAX('Table'[Date])))


Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

Helpful resources

Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors