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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MuthalibAbdul
Helper II
Helper II

Averages to include blank rows

Hello Community,

So to start with, I have a table with my employees and list of customers they dealt with on a day to day basis. I am able to get the count by day/week/month/quarter/year in a perfect way by having a Calender table and linking these two tables. 

 

Problem is when I calculate averages per month or per week, it does not include rows where 0 customers were seen. Hence the averages are higher than they should be. 

 

I have attached the dax below (created by quick measure) where I calculate the average per month and week. I have an interactive  dashboard and I also need the values to change when a selection has been made. Like a particular employee etc. 

 

Your help would be appreciated.

 

MuthalibAbdul_0-1717522591324.pngMuthalibAbdul_1-1717522610108.png

 

Update:

I just solved this by creating two measures, one for distinct count of week and other toal encounters and also tried your way. The results for both the method are same. However, your method is easy and quick. 

The next issue I have is few employees started in the middle of the year, say June. Both the methods mentioned above is calculating all the weeks since Jan. 

 

How do I set a conditional saying if any week has an input (basically means new employee joined), then start doing rolling average from that point forward. 

 

I am also anticipating another issue where an employee left, so provide a condition for a stop for particular employees. 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@MuthalibAbdul Try adding + 0 right after your CALCULATE statement



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...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@MuthalibAbdul Try adding + 0 right after your CALCULATE statement



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...

Perfect, I just solved this by creating two measures, one for distinct count of week and other toal encounters and also tried your way. The results for both the method are same. However, your method is easy and quick. 

The next issue I have is few employees started in the middle of the year, say June. Both the methods mentioned above is calculating all the weeks since Jan. 

 

How do I set a conditional saying if any week has an input (basically means new employee joined), then start doing rolling average from that point forward. 

 

I am also anticipating another issue where an employee left, so provide a condition for a stop for particular employees. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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