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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AlinaJacon
New Member

How to split the budget amount by month using start date and end date?

Hi champs,

 

I am very new to PowerBI and stuck with a challenge in the first week of my new job.

 

I have a dataset consisting of budget data by projects. Some of the fields include Project Owner, Project Name, Start Date, End Date and Budget amount.

All I want to do is to calculate the budget amount by month and year.

The image given is a dummy data (due to confidentiality issues, I cant share the original data here)

As per the image, I need to show the budget for each year and month

It will be:

 a) Project ABC : GBP16,667 per year and GBP 1,379 per month (100,000 / 73 months)

 b)Project XYZ : GBP5,000per year and GBP 5,000 per month (5,000/1 month)

 

Please help me out here

Thanks,

Alina

20221011_015618.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AlinaJacon ,

According to your description, you want to show the budget for each year and month, right? Here are my steps you can follow as a solution.

 

(1)This is my test data.

vtangjiemsft_1-1665481411977.png

 

(2)We can create  new columns.

GBP Per Month = DIVIDE('Table'[Budget], IF( DATEDIFF('Table'[Project Start Date],'Table'[Project End Date],MONTH) =0, 1,DATEDIFF('Table'[Project Start Date],'Table'[Project End Date],MONTH)))

 

GBP Per Year = DIVIDE('Table'[Budget], IF( YEAR('Table'[Project End Date])- YEAR('Table'[Project Start Date]) =0 ,1,YEAR('Table'[Project End Date])- YEAR('Table'[Project Start Date])))

 

(3) Then the result is as follows.

vtangjiemsft_0-1665481396483.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @AlinaJacon ,

According to your description, you want to show the budget for each year and month, right? Here are my steps you can follow as a solution.

 

(1)This is my test data.

vtangjiemsft_1-1665481411977.png

 

(2)We can create  new columns.

GBP Per Month = DIVIDE('Table'[Budget], IF( DATEDIFF('Table'[Project Start Date],'Table'[Project End Date],MONTH) =0, 1,DATEDIFF('Table'[Project Start Date],'Table'[Project End Date],MONTH)))

 

GBP Per Year = DIVIDE('Table'[Budget], IF( YEAR('Table'[Project End Date])- YEAR('Table'[Project Start Date]) =0 ,1,YEAR('Table'[Project End Date])- YEAR('Table'[Project Start Date])))

 

(3) Then the result is as follows.

vtangjiemsft_0-1665481396483.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Shaurya
Memorable Member
Memorable Member

Hi @AlinaJacon,

 

Use this DAX Code to create a new column:

 

GBP Per Month = 'Table'[Budget]/(DATEDIFF('Table'[Start Date],'Table'[End Date],MONTH)+1)

 

Result:

 

Screenshot 2022-10-11 070825.jpg

 

Works for you? Mark this post as a solution if it does!

amitchandak
Super User
Super User

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.