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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
RafaelAguirre02
Frequent Visitor

Comparing the current month to the previous month on a daily basis

I need help comparing the current month to the previous month on a daily basis when the current month has fewer days than the previous month. An example of this is when I select the month of November (30 days) in my filters, my metric to calculate the value of the previous month pulls the month of October but until the 30th and not the 31st. This gets me in trouble as you don't compare the month's closings. How could you make this daily comparison in these cases?

2 REPLIES 2
FreemanZ
Super User
Super User

hi @RafaelAguirre02 ,

 

Ensure to use EDATE or DATEADD(dates[date], -1, MONTH). They always shift by month instead of day. 

 

For further question, please consider post some sample data with expected result. 

RafaelAguirre02_0-1703093745882.png


This would be an example of what im trying to do. I'm not sure if it can be done but, in this type of cases where the selected month has less days than the previous one, im trying to make the selected month to use the last day for the extra days. like in this sample a shared where the day number 30 of november is used twice for the difference table to subtract day 30 and day 31 of October which is the previous month.

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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