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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
BEENSGROEPADMIN
Frequent Visitor

Cummulative sum by one value till maximum

Hello,

 

The following table is relevant to know for this case.

1. Production quantities: this table lists a quantity of the total project per production activity:

BEENSGROEPADMIN_0-1668410054681.png

The first row contains production activities, the second contains the units, the third contains the total quantity of the production activity and the last contains the average cycle time of the production activity.

 

Another table lists the produced quantity of an production activity by week. 

I want to make an line-chart with two lines:

1. Is the cummulative sum of the registrated production quantity (this line already consists)
2. A line that sums one value of 'Doorlooptijdbegroting' (average cycle time) till the max of that production activity named 'Hoeveelheden' (total amount).
Example: 

one activity 'Aanbrengen damwanden (drukken)' has a total amount of 227 meters. The average cycle time is 56 meters per week. The line has to cummulate the 56 till it has reached the total amounto 227: 56+56+56+56+rest (3).

 

Note: Both tables are related to a date table with weeknumbers.

 

I am hoping some could help me! Thanks a lot.

 

Kind regards,

 

Admin BG

#cummulative #sum #datetable

 

2 REPLIES 2
BEENSGROEPADMIN
Frequent Visitor

Hello,

 

I've created the following measure based on your measures:

BEENSGROEPADMIN_1-1668516911628.png

 

The following line is generated by this measure:

BEENSGROEPADMIN_0-1668515242794.png

This line starts at the first week of the year. Now I want to start this line chart at the same moment when the first production activity is registrated. This date value is " 'table - productregistration'[when] ".

 

Do you know what I should change in this Measure? Maybe it is relevant to know the following date table:

BEENSGROEPADMIN_2-1668517013244.png

 

Thanks a lot for helping me out!

 

 

 

 

Syndicate_Admin
Administrator
Administrator

Hi, @Syndicate_Admin

I'm curious to know how your week chart relates to the data sheet. You can try the following methods.

Measure1 = 
Var _aver1=CALCULATE(MAX('Table'[Doorlooptijdbegroting]),FILTER(ALL('Table'),[Activiteit]="Aanbrengen damwanden (drukken)"))
Var _max1=CALCULATE(MAX('Table'[Hoeveelheden]),FILTER(ALL('Table'),[Activiteit]="Aanbrengen damwanden (drukken)"))
Var _runningsum=SUMX(FILTER(ALL(Week),Week[Week]<=SELECTEDVALUE(Week[Week])),_aver1)
Return
IF(_runningsum<=_max1,_runningsum,"descanso")
Measure2 = 
Var _aver1=CALCULATE(MAX('Table'[Doorlooptijdbegroting]),FILTER(ALL('Table'),[Activiteit]="Aanbrengen damwanden (trillen)"))
Var _max1=CALCULATE(MAX('Table'[Hoeveelheden]),FILTER(ALL('Table'),[Activiteit]="Aanbrengen damwanden (trillen)"))
Var _runningsum=SUMX(FILTER(ALL(Week),Week[Week]<=SELECTEDVALUE(Week[Week])),_aver1)
Return
IF(_runningsum<=_max1,_runningsum,"descanso")

vzhangti_1-1668492084763.png

If the result is different from what you expected, please tell more details.

Best Regards,

Community Support Team _Charlotte

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

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.