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
Libbyb23
Helper III
Helper III

Using TotalMTD Formula is Pulling last day of last month

Hi, 

I am trying to calculate the sum of sales for current mtd. The formula I am using is below and is working, except for the fact it is pulling sales data from 5/31.

Sold = TOTALMTD(SUM('Sales Data'[sales_price]), 'Sales Data'[invoice_date], FILTER('Sales Data', 'Sales Data'[invoice_date].[Year] = 2024))
2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @Libbyb23 - This should give you the correct MTD sales total without including data from previous years or months

 

Try below logic

 

Sold =
CALCULATE(
TOTALMTD(
SUM('Sales Data'[sales_price]),
'Sales Data'[invoice_date]
),
FILTER(
ALL('Calendar'),
'Calendar'[Year] = YEAR(TODAY())
)
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





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

Proud to be a Super User!





View solution in original post

Libbyb23
Helper III
Helper III

Hi!

Thanks for the quick help!

I used the formula you provided and updated Today() to 2024. Today () was still pulling from last year.

Sold = CALCULATE(
TOTALMTD(
SUM('Sales Data'[sales_price]),
'Sales Data'[invoice_date]
),
FILTER(
ALL('Date Dimension'),
'Date Dimension'[Year] = YEAR(2024)
)
)

View solution in original post

2 REPLIES 2
Libbyb23
Helper III
Helper III

Hi!

Thanks for the quick help!

I used the formula you provided and updated Today() to 2024. Today () was still pulling from last year.

Sold = CALCULATE(
TOTALMTD(
SUM('Sales Data'[sales_price]),
'Sales Data'[invoice_date]
),
FILTER(
ALL('Date Dimension'),
'Date Dimension'[Year] = YEAR(2024)
)
)
rajendraongole1
Super User
Super User

Hi @Libbyb23 - This should give you the correct MTD sales total without including data from previous years or months

 

Try below logic

 

Sold =
CALCULATE(
TOTALMTD(
SUM('Sales Data'[sales_price]),
'Sales Data'[invoice_date]
),
FILTER(
ALL('Calendar'),
'Calendar'[Year] = YEAR(TODAY())
)
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





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.