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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mzienowicz99
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 🙂

1 REPLY 1
Shaurya
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

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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