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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ShahzadBasra
New Member

Last day and same day last month

I have a data of millions tanx where receive data on daily basis I want to create a dax to calculate same day last month data.

I e current day 27 oct'22 and same day last month 27 Sep'22

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @ShahzadBasra 

You can try formula like:

lastmonth = CALCULATE([Measure],DATEADD('Table'[Date],-1,MONTH))

veasonfmsft_0-1668665737904.png

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @ShahzadBasra 

You can try formula like:

lastmonth = CALCULATE([Measure],DATEADD('Table'[Date],-1,MONTH))

veasonfmsft_0-1668665737904.png

Best Regards,
Community Support Team _ Eason

m_alireza
Solution Specialist
Solution Specialist

@ShahzadBasra ,

Are you after this calculated column?

date last month = DATE(Year('Table'[Date]), MONTH('Table'[Date]-1), DAY('Table'[Date]))

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.