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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

YTD with a custom calendar?

Hi everyone,

 

I've read several posts about usage of YTD formula, but still have some doubts.

 

I need to find a way to calculate a sum of CFU gained during the academic year. For the current ac.year it's quite straighforward, but then I need to compare this CurrentYearSum with 5-10 previous years, i.e. from the start of each academic year *in the past* till the current DayMonth that year in the past. For example, in academic year 2016/2017 by 01/03/2017 there are X CFU gained, I need to calculate the same measure for academic year 2015/2016 till the 01/03/2016. The end date is defined by the user by applying slicers.

 

This is the definition of academiс year that brings confusion: it lasts more than one calendar year, e.g. starts on 01/11/2015 and ends on 01/05/2017  (547 days).  

 

 

After reading some articles on the topic, I'm not sure whether it is possible to use these functions with such custom calendar at all. If yes, could someone please give me any general directions, how this can be implemented? Or what can be the point to start with?

 

Thank you!

 

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Maybe you could try "TotalYTD" and "Sameperiodlastyear".

Something like this:

 

TotalYTD =
TOTALYTD (
    SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] ),
    'Date'[Date],
    "03-01"
)
TotalYTDLastyear =
CALCULATE ( [TotalYTD], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )

YTD with a custom calendar.jpg

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-jiascu-msft , thank you for the explanation.

It doesn't solve my problem, but the only reason I think is because it is in general can't be solved with YTD formulas.

vanessafvg
Community Champion
Community Champion

@Anonymous you can tell it when your year operates ie

 DATESYTD(‘Date'[Date],”03-01″)

 

but in terms of the length of time i dont think so

 

the best thing to do is create and indicator for the year and custom cummulators of your measures perhaps?

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.