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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
matratus28
Resolver I
Resolver I

Single Average Value in Power Pivot / DAX

Hi,

I've got a data set of product sales and volumes.

The data is at week, product and customer level.

The 1st 13 weeks are my BASE VOLUMES and I want to calculate the average volumes for the combined 13 weeks and then track future weekly VOLUMES against the base average.

I also have a column in my data called "Timeframe" which identifies anything in the 1st 13 weeks as "Base Data" and anything after as "Live"

I'm trying to write a DAX formula that gives me the average weekly volumes so I have a single value as the average for the 1st 13 weeks.

When I pull my measure into my pivot it gives me the weekly average figure (so a different figure for each week) rather than the combined 13 week average. (the average figure needs to be consistent so it can be used in a line chart as the average)

 

Can anyone help please?

 

I've been trying various versions of this:

 

AverageBaseQty:=CALCULATE(

SUM(t_volumes[EACHES]) ,

't_volumes'[Timeframe] = "Baseline"

) /13

 

1 ACCEPTED SOLUTION
matratus28
Resolver I
Resolver I

I found a solution that looks for all the volumes if in the week is before 202514 and divides by 13
That then overrides the week in the pivot table and gives just the average for the entire 13 weeks

 

 

BaseAverageEACHES:=CALCULATE(

SUM(t_volumes[EACHES]),

t_volumes[Timeframe] = "Baseline",

t_volumes[Week] <=202513

) /13

View solution in original post

3 REPLIES 3
matratus28
Resolver I
Resolver I

I found a solution that looks for all the volumes if in the week is before 202514 and divides by 13
That then overrides the week in the pivot table and gives just the average for the entire 13 weeks

 

 

BaseAverageEACHES:=CALCULATE(

SUM(t_volumes[EACHES]),

t_volumes[Timeframe] = "Baseline",

t_volumes[Week] <=202513

) /13

AnkitKukreja
Super User
Super User

Hi! @matratus28 

 

Is it possible to share the data after masking/removing pii information to have a look at it.

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
matratus28
Resolver I
Resolver I

This is what I'm trying to achieveexample.png 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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