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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
insandur
Helper II
Helper II

Calculate Selected Year & Month's YTD and Previous year ytd for the same month in filter selection

Hi All,

 

 I am struggling to calculate ytd for the selected year & month  and previous year YTD for the same selected month in filter.

 

For example, if i select FY 2023 YTD July in filter, it should provide me the year to date value starts from Jan 2023 upto July 2023. And it should also provide me the previous year to date value starts from Jan 2022 upto July 2022.

2 REPLIES 2
v-tianyich-msft
Community Support
Community Support

Hi @insandur ,

 

I hope this tutorial will help you:Power BI DAX: Previous Month-to-Date, Quarter-to-Date, and Year-to-Date Calculations - RADACAD

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Wilson_
Super User
Super User

Hi insandur,

 

Hard to provide specific help without knowing anything at all about your data model or what you're trying to calculate, but you might find this article helpful (https://www.popautomation.com/post/power-bi-ytd-and-pytd-dax#:~:text=To%20calculate%20YTD%20and%20Pr...).

 

If you have any specific questions about the article or can provide any details about your data model, happy to be of further help. 🙂


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.