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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
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.