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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

YTD based on slicer in matrix

Hi

 

I currently have this formula to calculate YTD , however this means that I have to change the date in the formula every time i want to change the month.

 

Is there a measure i can create which provides me the YTD value, based on the month that is selected on my slicer? I have a column in the table which is a date.

 

SC YTD = TOTALYTD(sum(Append1[Actual/Forecast]),DATESBETWEEN(Append1[Date],DATE(2019,01,01),DATE(2019,03,31)))

 

Thanks in advance!

1 ACCEPTED SOLUTION
v-joesh-msft
Solution Sage
Solution Sage

Hi @Anonymous ,

You can create a Date table: Date = CALENDARAUTO()

Then create a measure like this:

SC YTD = CALCULATE(SUM(Append1[Actual/Forecast])),DATESYTD('Date'[Date]))

Results are as follows:

1.PNG

 

Here is a demo, please try it

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Ed5ioHwnWD9FvTvdswEVjboBy2q37oGg55WdUKVsApa1Wg?e=e6T0kN

Best Regards,

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

View solution in original post

1 REPLY 1
v-joesh-msft
Solution Sage
Solution Sage

Hi @Anonymous ,

You can create a Date table: Date = CALENDARAUTO()

Then create a measure like this:

SC YTD = CALCULATE(SUM(Append1[Actual/Forecast])),DATESYTD('Date'[Date]))

Results are as follows:

1.PNG

 

Here is a demo, please try it

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Ed5ioHwnWD9FvTvdswEVjboBy2q37oGg55WdUKVsApa1Wg?e=e6T0kN

Best Regards,

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors