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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Table Window Average equivalent

I'm looking to get an overall average per each week based on a dynamic amount of weeks and the dynamic sum of the table. I would like slicers to still work on this as I might be excluding weeks, so I can't push this back to the query input. This was fairly straightforward in Tableau, but PowerBI doesn't seem to have an intuitive way to do this.

 

Here is an example:

 

YearWeek       Miles           WindowAvg (need this)

201837           429,909        432,320.75

201836           401,844        432,320.75

201835           463,201        432,320.75

201834           434,329        432,320.75

Total            1,729,283      1,729,283

2 REPLIES 2
lbendlin
Super User
Super User

You'll want to look into the way TREATAS() works. That might give you what you need.

Anonymous
Not applicable

I don't see how that would be of use for this. There is a relationship between the date and the value column I have already.

 

The closest thing I could come up with would be appending the data with DAX, but I'm not sure if it would still be dynamic that way. This was a simple built in function with Tableau, not sure why they made this is so complicated with Power BI. I guess I'll keep playing around with it.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.