Forum Discussion

ashleylinkewich's avatar
ashleylinkewich
Advocate II
4 years ago

DAX: Creating a new table with months between dates and value equally divided by those months

Hi community,

 

Sorry for the poor title - I'm not sure how else to describe this problem. 

 

I am working on a project where I have a table that looks like this:

 

ProjectStart MonthEnd MonthValue
Project AJan 2022March 2022120
Project BDec 2021Feb 2022250
Project CApril 2022July 2022500

 

In order to forecast these values by month, I want to create a visual that has the value equally divided by the months the project spans. To do this, I anticipate I will need a new table that looks like this:

 

Project MonthValue
Project AJan 202240
Project AFeb 202240
Project AMar 202240
Project BDec 202183.33
Project BJan 202283.33
Project BFeb 202283.33
Project CApril 2022125
Project CMay 2022125
Project CJune 2022125
Project CJuly 2022125

 

Basically, I believe I need a table where each row is a month from each project (based on the start and end months) and the value divided equally between those months.

 

Does anyone have suggestions on how to solve this, or the DAX required? Also open to other solutions!

 

Cheers,