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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.