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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
aplask105
Frequent Visitor

AverageX not affecting calculation in Matrix

Hi all - 

Attempting to find an average of CountDistinct values over a period of time (including 0 where no record was recorded). 

Here is my calculation for Distinct activity by employee, by week:

aplask105_0-1675278670350.png

I've tried to leverage the following DAX to find the Average over X period of time [including 0 based on this article] :

aplask105_1-1675278789945.png

Unfortunately, my martix view is not recognizing the AverageX command and summed totals are showing, instead of Averages for each employee etc. (0s are popualating as intended):  

aplask105_2-1675278875417.png

As the title suggests, how can I get the AverageX to reflect each row of employee over time. My final expecation for this matrix is to ultimately remove the WeekEnd Column and have my KPIs aggregate accordingly. 

1 REPLY 1
amitchandak
Super User
Super User

@aplask105 , Try like

 

Averagex(summarycolumn, calculate([@cntD])

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors