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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Quinnie2017
Helper II
Helper II

Calculate weekly average from daily measure?

I'm having trouble with a measure that works well on a daily level - but sums at a weekly level - and I would prefer to see average at a weekly level.

 

This measure works good for daily:

CY Sales Store Count = CALCULATE(COUNT(NetSales_And_Traffic[Net Sales]),FILTER(NetSales_And_Traffic,NetSales_And_Traffic[Net Sales]>0))
 
And the measure works for weekly but sums the store counts.
 
I need a measure that averages the daily store counts for the week.
 
Something like: Avg Weekly Store Count Per Day = AVERAGE([CY Sales Store Count]), but that is not an option because you can't average a measure?
 
Sample data below with current result and desired result.
 
Any help in the right direction would be appreciated. Thank you!
 
DayWeekStore NumNet SalesCY Store Count
1/1/2021Week 1100$1001
1/2/2021Week 1101$1201
1/3/2021Week 1102$1301
1/4/2021Week 1103$901
1/5/2021Week 1104$1101
1/6/2021Week 1105$1301
1/7/2021Week 1106$1001
     
  Current Result: CY Store Count 7
  Desired Result: Avg Weekly Store Count Per Day 1
     
 
 
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Quinnie2017 use AVERAGEX

 

Avg Weekly = AVERAGEX( VALUES (Table[Date] ), [CY Sales Store Count])

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Quinnie2017 correct, values give you a table of unique values of the column you have in the values function.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Quinnie2017 use AVERAGEX

 

Avg Weekly = AVERAGEX( VALUES (Table[Date] ), [CY Sales Store Count])

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

This works - thanks!

 

To make sure I understand what DAX is doing:

 

It is looking at the number of values in [Date], which in this case is 7 because it is one week, and making that 7 the denominator.  And the numerator is [CY Sales Store Count].  The end result it the average of [CY Sales Store Count] / 7.

 

Is that right?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors