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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Cumulative sum and sameperiodlastyear after date on line graph

I'm having trouble getting a cumulative sum for this year and the prior year on a line graph. Here are my measures:

 

 

Total Proposed Project Costs CYTD = 
Calculate(Sum(proposal_budget[project_total_sponsor_proposed_costs]), filter(ALLSELECTED(CalendarSubmitted[Date]),CalendarSubmitted[Date]<MAX(CalendarSubmitted[Date])))
Total Proposed Project Costs CLYTD = 
Calculate([Total Proposed Project Costs CYTD],SAMEPERIODLASTYEAR(CalendarSubmitted[Date]))

 

 

It calculates this year fine, but it shows nothing for last year:

 

Screen Shot 2020-08-08 at 12.55.54 PM.png

 

I feel that I am just missing something simple, so any help would be appreciated.

 

Thanks!

 

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Greg_Deckler share useful blogs, please feel free to learn more from his blogs.

As seen from above, the first formula can be changed to:

 

Total Proposed Project Costs CYTD = 
Calculate(Sum(proposal_budget[project_total_sponsor_proposed_costs]), filter(ALLSELECTED(CalendarSubmitted),CalendarSubmitted[Date]<MAX(CalendarSubmitted[Date])))

 

or

 

Total Proposed Project Costs CYTD = 
Calculate(Sum(proposal_budget[project_total_sponsor_proposed_costs]), filter(ALLSELECTED(proposal_budget),proposal_budget[Date]<MAX(proposal_budget[Date])))

 

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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