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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Chrisjab28
Frequent Visitor

Daily Results vs. Total Results Average based on specific Day of Week and Category

Hello Experts - 

I am trying unsuccessfully to calculate the variance between a daily customer count to the total average for a defined period (last 3 months) by day of week (i.e. Monday) and location (Site Name).

 

Below is an example of the data set and the desired outcome:

 

Dataset

Chrisjab28_0-1670524386969.png

 

Desired Outcome:

Chrisjab28_1-1670524468611.png

 

So far, I've tried a couple of formulas leveraging AVERAGEX and ALLEXCEPT unsuccessfully:

 

Avg Customers =
VAR AvgCustomers = AVERAGEX('CUSTOMER PERFORMANCE',[Customer Count])
RETURN
IF (HASONEVALUE('CUSTOMER PERFORMANCE'[Date]),          
 AvgCustomers,
 sumx(VALUES('CUSTOMER PERFORMANCE'[Date]), AvgCustomers))
 
Daily Average Cutomer = CALCULATE([Avg Customers] , ALLEXCEPT('CUSTOMER PERFORMANCE','Calendar'[Date].[Date],'CUSTOMER PERFORMANCE'[Site]))
 
If anyone can help, that would be greatly appreciated.
 
Thanks
 

 

 

 

 

3 REPLIES 3
Chrisjab28
Frequent Visitor

@Greg_Deckler Thank you for your reply. Unfortuantely, you reference links do not reference the average. The main issue has to do with the Average of all the values and comparing them the the daily total. 

@Chrisjab28 Right, so use AVERAGEX instead of SUMX



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Chrisjab28 First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.