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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
bourne2000
Helper V
Helper V

Calculating MTD and YTD

Hi

 

I have a date table and Sales table. I am calculating MTD and YTD for the sales amount. Data is avaliable from Jan 1st 2020 to 28th May 2021

 

I am using the below calculation

 

MTD = TOTALMTD(sum([Sales['Amount']), Date['date'])

YTD = TOTALYTD(sum([Sales['Amount']), Date['date'])

 

My date table and sales table is connected with the date column

 

When I display the table for MTD and YTD, I am getting the below ouput, basically it shows the same values and not coming right. I have used the slicer for selecting the year

 

bourne2000_0-1626244273925.png

 

 

Can anyone confirm what's wrong here please?

 

 

3 REPLIES 3
amitchandak
Super User
Super User

@bourne2000 , Both MTD and YTD seem fine to me, what issue do you see. Grand total also showing sum based on MTD or YTD function

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  Thanks. If you see the MTD table, janurary month sales is 1274675 and MTD for januray is 1274675. this is correct. However, feburary sales amount is 1197639 and MTD also shows 1197639. MTD should be (1274675 + 1197639), right? But its showing the same value and same for other months as well. It should not be cumulative? The grant total is different, thats fine 

 

When I make clustered bar chart, both are looking same. Can you please advise? 

@bourne2000 , MTD is Month Till date. Means it will reset at every month start

YTD will add both Jan and Feb, That I can see in the screenshot you shared for YTD

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors