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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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