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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.