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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
peterso
Helper II
Helper II

Distributing values between start and end date

Hi everyone,

 

I'd like to evenly distribute values on a chart by month between the start and end date. I have a date table as well. Wondering if this is something that DAX can help with?

 

peterso_0-1614046668480.png

 

Thank you in advance

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@peterso , refer to this blog for measure way

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

 

Attached file for New table way

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

View solution in original post

5 REPLIES 5
JK-1
Helper II
Helper II

Thank you for the insight here (on old query, with file example).

 

I have used the measure;

Measure_Paid = CALCULATE(SUMX(SUMMARIZE(filter(CROSSJOIN(PaidData,DatePAY),DatePAY[Date] >= PaidData[From] && DatePAY[Date] <= PaidData[To]),PaidData[ID],DatePAY[Date],PaidData[Amount],PaidData[From],PaidData[To]),DIVIDE(PaidData[Amount],DATEDIFF(PaidData[From],PaidData[To],DAY)+1)))


but am experiencing a problem when there is a credit and replacement payment. So in 2024 within the PaidData I have 3 transactions:

 

01/01/2024-31/12/2024 £1000
01/01/2024-31/12/2024 £-1000
01/01/2024-31/12/2024 £1000

 

The above seems to be ignoring one of the positives. It continues to show a net return of £0 paid for 2024.  X-axis graph


Tried to adapt measure but can't quite reach a valid execution. Have checked existing totals (new visualizations table) and using Sum in the build visual column dropdown it shows £1000 for the period, flick to Don't summarize it returns the £1000 and £-1000 as 2 entries, giving me £0 overall, but not the third line and final £1000.

 

Any tips gratefully received. At present this representation throws out £1000 as potentially outstanding with the SUMX(SUMMARIZE --what options would be available to tailor it for inclusion?  {Sorry - newbie here}

Hi,

Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.  Please also explain the question.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I have the below (copied) as 'PaidData' table, with a further -[DatePAY] calendarauto() date table- using the Measure mentioned above within PowerBI. Using the graphs, stacked or lined, for 2024 the total value being reported is £0, and for 2025 £1500. The graph utilises the X and Y axis with just a

YEAR(DatePAY[Date]) in the DatePAY calendar to show the associated year.  So all in DAX
 

For 2024 the actual sum would be £1000 overall. But using the Measure it seems to have disregarded one of the 3 and can't tell what needs tweaked in the Measure. As I can only see £0 for 2024 this visually charts an untrue gap, versus what has been paid for 2024. So am trying to work out how the Measure can be improved, SUMX(SUMMARIZE -the filter would have the same ID but I don't know why its not totalling correctly. Thank you

 

'PaidData'

IDFromToAmountPaid
1001201/01/202431/12/2024100020/12/2023
1001201/01/202431/12/2024-100003/01/2024
1001201/01/202431/12/2024100005/01/2024
1001201/01/202531/12/2025150019/12/2024

 

Hi,

Please refer to my solution of a similar problem in the attached file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@peterso , refer to this blog for measure way

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

 

Attached file for New table way

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

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.