Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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:
Date | OT Hours | Team |
1/1/2023 | 6 | A |
1/7/2023 | 4 | A |
1/18/2023 | 5 | B |
2/3/2023 | 7 | B |
2/28/2023 | 3 | A |
3/5/2023 | 6 | A |
3/29/2023 | 3 | B |
4/6/2023 | 5 | B |
4/15/2023 | 10 | A |
4/23/2023 | 12 | A |
4/28/2023 | 8 | B |
5/2/2023 | 13 | B |
5/6/2023 | 10 | A |
5/12 | 12 | A |
Thank you!
Gab
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])
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.