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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
damit23183
Microsoft Employee
Microsoft Employee

5 Day Average per week

Hi,

 

I am looking for solution to get  5 day average per week.

 

I have table like this;

 

Test.png

 

I would like to see result like this;

Test.png

As you can see I would like to see 5 day average from current week to last 5 weeks.

 

I have tried some solution but not working as expected.

Any help would be appreciated!

 

Thanks

2 REPLIES 2
ThxAlot
Super User
Super User

avg5.pbix

 

A typical senario where WINDOW() function comes into play.

ThxAlot_0-1690862085264.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



ryan_mayu
Super User
Super User

@damit23183 

you can try to create an index column and use DAX to create another column

Column = 
VAR _max=max('Table'[Index])
return if ('Table'[Index]+4>_max,blank(),AVERAGEX(FILTER('Table','Table'[Index]>=EARLIER('Table'[Index])&&'Table'[Index]<=(EARLIER('Table'[Index])+4)),'Table'[total]))

11.PNG

pls see the attachment below





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

Proud to be a Super User!




Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.