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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
1234567666
Regular Visitor

Add Total Average Column within Matrix

Hi, I would like to add an Average Column at the end of this table. Could someone please help?

The rows are 1and2, column is New_Month and Value is Acctamt.

Some of the months do not have values for instance total average of the first row below should be -677.39(Total) / 3(number of month that have values)

7E4F4E18-37C1-4155-8D21-9E41FE03DE72.png

1 ACCEPTED SOLUTION
devanshi
Helper V
Helper V

AverageColumn =
IF( HASONEVALUE('Table'[New_Month]),
              IF( 'Table'[New_Month] IN {"1", "2"}, DIVIDE( SUM('Table'[Acctamt]),                                                                                         COUNTROWS(FILTER('Table', 'Table'[New_Month] IN {"1", "2"})) ),
                   BLANK() ),
BLANK() )

View solution in original post

1 REPLY 1
devanshi
Helper V
Helper V

AverageColumn =
IF( HASONEVALUE('Table'[New_Month]),
              IF( 'Table'[New_Month] IN {"1", "2"}, DIVIDE( SUM('Table'[Acctamt]),                                                                                         COUNTROWS(FILTER('Table', 'Table'[New_Month] IN {"1", "2"})) ),
                   BLANK() ),
BLANK() )

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.