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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
gabrielmission7
Frequent Visitor

Aggregation Sum Issue

Hi there,

 

I'm desperately wanting to get this solved as I've been struggling to find a right way to get it solved. 
I have a set of data with date, overtime hours, and team, and I'd like to pull a line graph with x-axis of timeline (month-year) and y-axis of OT hours. The graph is going to display all 3 teams' OT hours. However, the hours sum for each month is always based on the sum total from Jan 2023. Eg. for the total OT hours in May 2023, it'd be the total OT hrs from Jan 2023, Feb 2023, Mar, 2023, Apr 2023, and May 2023.

What's the best way to create such formula in dax?

sample data set:

DateOT HoursTeam
1/1/20236A
1/7/20234A
1/18/20235B
2/3/20237B
2/28/20233

A

3/5/20236A
3/29/20233B
4/6/20235B
4/15/202310A
4/23/202312A
4/28/20238B
5/2/202313B
5/6/202310A
5/1212A



Thank you!

 

Gab

 

 

 

1 REPLY 1
mlsx4
Memorable Member
Memorable Member

Hi @gabrielmission7 

 

If you have a calendar table, you can compute the aggregation by using TOTALYTD (https://learn.microsoft.com/en-us/dax/totalytd-function-dax)

 

 

Measure = TOTALYTD(SUM(Table[OT Hours]),Calendar[Date])

 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.