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! Learn more

Reply
peterso
Helper II
Helper II

DAX help with strange distribution

Hi everyone,

 

Hoping you can assist with this distribution, i'll do my best to explain. 

 

I'd like to distribute cost by month in such a way where it's cumulative(?) on the graph until the cost reaches it's end date, essentially ignoring the start date. When the end date is reached, the cost drops off.

 

For example, Jan 2018 would have $16,000 in cost (sum of project costs for all projects) and Mar 2021 would have $15,000 in cost (sum of project costs minus project A, since the end date has passed (1/30/2021).

 

Below is the table and I have a date table as well.

ProjectCostStart DateEnd Date
A$1,0001/1/20181/30/2021
B$5,00012/1/20203/2/2022
C$6,0007/27/20203/19/2021
D$3,0009/15/20216/20/2022
E$1,00012/19/20194/30/2021

 

@amitchandak 

 

Thank you in advance.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @peterso 

 

You can do like this. Create a date table, don't create relationships, and create a measure to calculate the desired result.

Like this:

Date Table = CALENDAR(MIN('Table'[Start Date]),MAX('Table'[End Date]))
Measure = SUMX(FILTER(ALL('Table'),[End Date]>MIN('Date Table'[Date])),[Cost])

11.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

7 REPLIES 7
v-janeyg-msft
Community Support
Community Support

Hi, @peterso 

 

You can do like this. Create a date table, don't create relationships, and create a measure to calculate the desired result.

Like this:

Date Table = CALENDAR(MIN('Table'[Start Date]),MAX('Table'[End Date]))
Measure = SUMX(FILTER(ALL('Table'),[End Date]>MIN('Date Table'[Date])),[Cost])

11.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

v-janeyg-msft
Community Support
Community Support

Hi, @peterso 

 

According to your description, I can understand your calculation logic, sum costs and ignore start date. But it’s not clear what visual you want to use to present the results. Can you add more desired results information?

 

Best Regards

Janey Guo

 

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

amitchandak
Super User
Super User

@peterso , refer the blog or the file attached if those can help

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

 

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

I reviewed those files earlier. They aren't relevant for this distribution. 

@peterso , please share in table format. Let me try. I need to get $16,000  for Jan 2018, that should be Jan 2021. As there is only one project is there on Jan 2018 ?

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

@peterso ,Not getting your number. Check Page 2 and table 3

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

Hi - I think maybe it would help to entirely ignore the start date.

 

Essentially this distribution ignores the start date. It assumes all projects are started as as long as the end date is not past today's date.

 

Once the end date for a project has passed, the project costs drop off.

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.

Top Solution Authors