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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Cumulative Data sum by day

Hi Every one,

I developed a calculated column as below for cumulative line to sum actual man hours , but it doesnt sum up at all ! 

Cumulative Actual = 
 CALCULATE (
   sum ( 'PBI LabourCode_Actual'[ActualsManHours] ),
   FILTER (
      ALL ( 'PBI LabourCode_Actual'),
     'PBI LabourCode_Actual'[WorkDate] <= MAX ( 'PBI LabourCode_Actual'[WorkDate] )
)
)

actual.PNG 

As you can see in the above table, cumulative data is showing wrong numbers

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Create a Calendar Table and build a relationship from the WorkDate column of the PBI LabourCode_Actual Table to the Date column of the Calendar Table.  In your visual, drag Date from the Calendar Table.  Write this measure

 

Cumulative Actual =
 CALCULATE (
   sum ( 'PBI LabourCode_Actual'[ActualsManHours] ),DATESYTD(Calendar[Date],"31/12"))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

Create a Calendar Table and build a relationship from the WorkDate column of the PBI LabourCode_Actual Table to the Date column of the Calendar Table.  In your visual, drag Date from the Calendar Table.  Write this measure

 

Cumulative Actual =
 CALCULATE (
   sum ( 'PBI LabourCode_Actual'[ActualsManHours] ),DATESYTD(Calendar[Date],"31/12"))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur 

Thanks mate!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Modify the measure as below and check if it can meet your requirement.

Cumulative Actual =
CALCULATE (
SUM ( 'PBI LabourCode_Actual'[ActualsManHours] ),
ALLEXCEPT ( 'PBI LabourCode_Actual', 'PBI LabourCode_Actual'[Date] )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

@v-yuta-msft 

No, unfortunately it doesnt work ! it doesnt sum up . look at the below result.

 Cumulative.PNG

PattemManohar
Community Champion
Community Champion

@Anonymous Please try changing your logic as below

 

Cumulative Actual = 
 CALCULATE (
   sum ( 'PBI LabourCode_Actual'[ActualsManHours] ),
   FILTER (
      ALL ( 'PBI LabourCode_Actual'),
     'PBI LabourCode_Actual'[WorkDate] <= EARLIER ( 'PBI LabourCode_Actual'[WorkDate] )
)
)




Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.