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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Partial Month Maintenance

I have the following measure created for partial month maintenance and receiving error on it.  Is there a way to fit.
 
Maint_Revenue_Partial = IF(FORMAT(Waterfall_DateCJ[Date Item Beg], "yyyy-mm") = Waterfall_DateCJ[DM Year Month],
Waterfall_DateCJ[Maint_Revenue] * ((30 - (DAY(Waterfall_DateCJ[Date Item Beg]))+1) / 30),
IF(FORMAT(Waterfall_DateCJ[Date Item END], "yyyy-mm") = Waterfall_DateCJ[DM Year Month],
Waterfall_DateCJ[Maint_Revenue] * ((DAY(Waterfall_DateCJ[Date Item End])) / 30),
Waterfall_DateCJ[Maint_Revenue]))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you Amit for providing the Dax code.  Aplogize for not getting back with you soon...the information you provided was very helpful and was able to use it to correct the error.  Thank you again for all your help.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , can you share the error.

 

Try this

Maint_Revenue_Partial = IF(FORMAT(Waterfall_DateCJ[Date Item Beg], "yyyy-mm") = Waterfall_DateCJ[DM Year Month],
Waterfall_DateCJ[Maint_Revenue] * ((DAY(eomonth(Waterfall_DateCJ[Date Item Beg],0)) - DAY(Waterfall_DateCJ[Date Item Beg])) / DAY(eomonth(Waterfall_DateCJ[Date Item Beg],0))),
IF(FORMAT(Waterfall_DateCJ[Date Item END], "yyyy-mm") = Waterfall_DateCJ[DM Year Month],
Waterfall_DateCJ[Maint_Revenue] * ((DAY(Waterfall_DateCJ[Date Item End])) / eomonth(DAY(Waterfall_DateCJ[Date Item End]),0)),
Waterfall_DateCJ[Maint_Revenue]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you Amit for providing the Dax code.  Aplogize for not getting back with you soon...the information you provided was very helpful and was able to use it to correct the error.  Thank you again for all your help.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.