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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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