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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
usershan
New Member

DAX Month to date

Hi All,

I have a formula in Oracle BI that needs to be converted to Power BI Dax measure.

Oracle BI - ToDate(SUM(table.column1), [Level Fiscal Month])

 

Can you all help me in this? How to write this in Power BI? I tried using calculate and DatesMTD, it is not working.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @usershan 

If you want to calculate the data of the current month up to the current maximum date, you can use this formula.

DATESMTD : Returns a table that contains a column of the dates for the month to date, in the current context.

MTD = CALCULATE(SUM('Table'[value]),DATESMTD('Table'[Date]))

If you are not familiar with DATESMTD, DATESQTD, DATESYTD, you can refer to my pbix file, I listed different DAX applications scenarios in it . Hope it will help you !

 

Best Regard

Community Support Team _ Ailsa Tao

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @usershan 

If you want to calculate the data of the current month up to the current maximum date, you can use this formula.

DATESMTD : Returns a table that contains a column of the dates for the month to date, in the current context.

MTD = CALCULATE(SUM('Table'[value]),DATESMTD('Table'[Date]))

If you are not familiar with DATESMTD, DATESQTD, DATESYTD, you can refer to my pbix file, I listed different DAX applications scenarios in it . Hope it will help you !

 

Best Regard

Community Support Team _ Ailsa Tao

amitchandak
Super User
Super User

@usershan , if you need MTD, Datesmtd with date table should help

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))

 

 

or

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Hi, Is there way to create a measure from start date to till date of the month. For example, I have Plan sheet which has day wise plan numbers till end of this month (From 01-01-2023 to 31-01-2023) but I want to know the sum of plan qty till today. Is it possible?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.