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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
samc_26
Helper IV
Helper IV

Cumulative target by day and month

Hi, I have a table which look a bit like this and I need it to show the target value cumulatively but going from 0 at the start of the month to the target at the end of the month as shown in the last column. If anyone can help me please it would be much appreciated! I also have a date table with YYYY-MM and dates if that's any help!

 

N.B. I don't need it to show the target as shown in the middle column, this is just to show the raw data.

 

Thank you for reading! 

 

DateTargetCumulative target
01/01/251003.2
02/03/2506.4
03/01/2509.6
...0...
31/01/250100
1 ACCEPTED SOLUTION
Selva-Salimi
Super User
Super User

hi @samc_26 ,

 

you can write a column for year_month as follows:

year_month = FORMAT('Table'[Date],"YYYYMM")

 

and then add another column like this:

 

Column = var sum_target = CALCULATE(SUM('Table'[Target]),FILTER('Table','Table'[year_month]=EARLIER('Table'[year_month])))
var days_count = CALCULATE(DISTINCTCOUNT('Table'[Date]),FILTER('Table','Table'[year_month]=EARLIER('Table'[year_month])))
var dc = CALCULATE(DISTINCTCOUNT('Table'[Date]),FILTER('Table','Table'[Date] <=EARLIER('Table'[Date]) && 'Table'[year_month]=EARLIER('Table'[year_month])))
var cumulative_target = sum_target/days_count *dc
return
cumulative_target
 
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
Selva-Salimi
Super User
Super User

hi @samc_26 ,

 

you can write a column for year_month as follows:

year_month = FORMAT('Table'[Date],"YYYYMM")

 

and then add another column like this:

 

Column = var sum_target = CALCULATE(SUM('Table'[Target]),FILTER('Table','Table'[year_month]=EARLIER('Table'[year_month])))
var days_count = CALCULATE(DISTINCTCOUNT('Table'[Date]),FILTER('Table','Table'[year_month]=EARLIER('Table'[year_month])))
var dc = CALCULATE(DISTINCTCOUNT('Table'[Date]),FILTER('Table','Table'[Date] <=EARLIER('Table'[Date]) && 'Table'[year_month]=EARLIER('Table'[year_month])))
var cumulative_target = sum_target/days_count *dc
return
cumulative_target
 
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly.

 

 

Thank you very much @Selva-Salimi , this worked great! 🙌

ajaybabuinturi
Memorable Member
Memorable Member

Hi @samc_26,

I am little bit consfusing about your query, could you please provide .pbix file along with expected result. So that I can try to provide the solution. 

Use any cloud platform to provide file and add that url(public access) here by using insert link.

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.


 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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 Kudoed Authors