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

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.

Reply
feralvarez994
Helper II
Helper II

Calculate cumulative average delay between several columns

Hey! Im looking forward calculating the average delay per category, i have one column per different delay and want to show them all as acumulative in a line chart or stack area chart. I currently have this chart that shows the average per category, but i want to show it too as acumulative to make the user realize the total estimated delay. How can i do that? I do not have time series here, just categories and delay per category.

 

feralvarez994_0-1673282196568.png

Im attaching the power bi file for anyone that can helps me, thanks!

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @feralvarez994 ,

 

Does the cumulative value you mentioned refer to the cumulative value of the average of each species? If so, please try this:

Here is my simple sample:

vjianbolimsft_0-1673334381447.png

 

Measure = 
var _a = SUMMARIZE(ALL('Table'),'Table'[ID],"Average",AVERAGE('Table'[Value]),"Rank",RANKX(ALL('Table'),[ID],,ASC,Dense))
var _b = MAXX(FILTER(_a,[ID]=MAX('Table'[ID])),[Rank])
return SUMX(FILTER(_a,[Rank]<=_b),[Average])

Output:

vjianbolimsft_1-1673334402117.png

Note: If the categories on your x-axis are not in a specific order, you might consider adding columns for sorting it using the switch function

 

Best Regards,

Jianbo Li

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

 

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @feralvarez994 ,

 

Does the cumulative value you mentioned refer to the cumulative value of the average of each species? If so, please try this:

Here is my simple sample:

vjianbolimsft_0-1673334381447.png

 

Measure = 
var _a = SUMMARIZE(ALL('Table'),'Table'[ID],"Average",AVERAGE('Table'[Value]),"Rank",RANKX(ALL('Table'),[ID],,ASC,Dense))
var _b = MAXX(FILTER(_a,[ID]=MAX('Table'[ID])),[Rank])
return SUMX(FILTER(_a,[Rank]<=_b),[Average])

Output:

vjianbolimsft_1-1673334402117.png

Note: If the categories on your x-axis are not in a specific order, you might consider adding columns for sorting it using the switch function

 

Best Regards,

Jianbo Li

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

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.