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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.