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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Blank values causing the moving average calculation to be blank

Hi All,

 

I have a measure that utilizes Sumx 

Avg Fees (K) = SUMX(
VALUES(pipeline[OpportunityID]),
AVERAGE(pipeline[EstimatedFees])
)/1000
 
And I use this measure in my Moving average measure
T6W AVG WINS = CALCULATE([Avg Fees (K)],DATESINPERIOD(pipeline[Nearest Friday],LASTDATE(pipeline[Nearest Friday]),-42,DAY))/6
Nearest Friday is my date. 
The results are as follows. The week of 05/21/2021 is missing from the Moving average since there is no Avg Fees that week. But I would like it to still take the moving 6 week average even of the week with 0 avg fees.ManalYunes_1-1629164420168.png
 
Please advise 🙂

 


 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

It will be ideal to have a Calendar Table with a relationship from the Nearest Friday field of the Pipeline table to the Date field of the Calendar Table.  Please also show the exact result you are expecting for 5/28/2021.  Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

It will be ideal to have a Calendar Table with a relationship from the Nearest Friday field of the Pipeline table to the Date field of the Calendar Table.  Please also show the exact result you are expecting for 5/28/2021.  Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish,

 

That was it, all I did was join Nearest Friday with a Date table and then I created my measures off of that table instead of the Neasrest Friday date and it worked! 
Thank you!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors