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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

YTD calculation with Month Filter

Hello everyone,

 

I am trying to create DAX for YTD with Filter as shown below. My date range starts from 01/01/2012 to the current date.  When I filter on any of the months then the YTD with Filter should calculate the sales till that month for example as shown below in the 1st table, I have filtered on month '06/1/2019' and I got YTD for the year 2019 till June as '270'. I tried using TOTALYTD but that is giving me just the '06/1/2019' sales rather than from 01/01/2019 to 06/01/2019. I need my YTD calculation to give me the sum of sales from Jan to June as '270' as shown in below 2nd table

 

DateSalesYTD with Filter
   
7/1/20182020
8/1/20184060
9/1/201860120
10/1/201870190
11/1/201880270
12/1/201890360
1/1/20192020
2/1/20193050
3/1/20194090
4/1/201950140
5/1/201960200
6/1/201970270
7/1/201980 
8/1/201990 
9/1/2019100 
10/1/2019110 

 

DateSalesTOTALYTDYTD with Filter
6/1/20197070270
1 ACCEPTED SOLUTION
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

 

TOTALYTD should indeed give 270 as you say. Can you share the formula you used for TOTALYTD?

Could you also share a sample Power BI file via DropBox, One Drive or another similar tool?

 

Regards

 

LC

View solution in original post

1 REPLY 1
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

 

TOTALYTD should indeed give 270 as you say. Can you share the formula you used for TOTALYTD?

Could you also share a sample Power BI file via DropBox, One Drive or another similar tool?

 

Regards

 

LC

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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