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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
aswathyjoe
Frequent Visitor

DATESMTD IS NOT WOKING AS EXPECTED

Hi

I am building a new table called "Date Period" based on my date dimension table.

Below shown is the dax I used to create the new table and columns.

Date Period = ADDCOLUMNS(DATESMTD (Dim_Date[Date]),"Type","MTD")
 
as shown in the picture, I have the date 1/1/2023 for this month in the date dimension table.
 
aswathyjoe_0-1674071135548.png
aswathyjoe_1-1674071237784.png
 
but my new table is giving me a differnet date in 2024. please see the undelined date above.

 

 

What am I doing wrong here. Can anyone help ?

My date dimension contains dates until 2024. is it because of that I am getting MTD date as different ?

How can I get the MTD based on the current month ?

 
 

 

3 REPLIES 3
HotChilli
Community Champion
Community Champion

I'm a bit confused as to what you're trying to do and what is stated in the original post.

Have you created a one row table and you don't know where it comes from?  It's probably the last date in the dim_date table.

--

What is it you are trying to do?  Can you post some sample data and the desired result please?

AnthonyJoseph
Resolver III
Resolver III

Hi @aswathyjoe .MTD returns the value in Date/time format.  Can you try changing the data type of the column to be Date. 

 

Thanks,

AnthonyJoseph

 

Hi Anthony, Thnaks for the reply.

I tried changing it. please see below. its still giveing a date in 2024

aswathyjoe_1-1674071882963.png

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.