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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
juliecornelius
Frequent Visitor

Spreading Budgeted Cost Across Months

I have a project which is resource loaded with manpower and fixed costs and I'm working on a report to project when we will spend the dollars. I searched this forum and found instructions to do this by creating a calendar table and crossjoining my original table and the calendar table.  (https://community.powerbi.com/t5/Desktop/Splitting-Values-between-months-of-two-dates/m-p/181278#M79...)

However, I'm not getting the correct results.  The matrix looks the way I want it to, but it is missing any values which don't begin on or span the first day of the month.  How can I make it display values which fall at any point in the month, not just on the first day of the month?  I would appreciate any help anyone can give me.  Thank you!

 

Capture.JPG

 

 

 

2 ACCEPTED SOLUTIONS

You are missing ', 0' as second argument in EOMONTH, and you should remove MONTH in the EOMONTH as here

<=EOMONTH(Tasks[TaskFinishDate], 0)


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

Anonymous
Not applicable

Actually, I know what's wrong... Change the expression to:

 

[Cost] / ( Number.From( [Finish] - [#"Start "] ) + 1 )

Subtracting a date from a date in M (Power Query's language) creates a duration and a duration cannot be added to a number (+1). But you can convert a duration to a number using the function Number.From. Hope this finally is the last brick to build your house.

 

Best

Darek

View solution in original post

21 REPLIES 21
Anonymous
Not applicable

ENDOFMONTH is a time-intelligence function and will only work correctly on a proper Date table. You cannot use it on a column in any other table. If you do, either you'll get an error or the returned value will be unreliable.

 

Best

Darek

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors