Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
hi guys,
I am using one Matrix visual, as per below image, with column "Category" in Coumns, Values column in Values and Company in rows
But the Column Sub Total is showing me the average of all columns...and I need the sum
Below is the dax formula I am using to get the average by each column
How can I set the Column Sub Totals to show the sum of all columns averages?
Solved! Go to Solution.
Hi @lucashmcury
Please try
Average of Values average per Company Names =
VAR NormalAverage =
AVERAGEX (
KEEPFILTERS ( VALUES ( 'Company'[Names] ) ),
CALCULATE ( AVERAGE ( 'Values'[Values] ) )
)
VAR SumOfAverage =
SUMX (
VALUES ( 'Table'[Category] ),
CALCULATE (
AVERAGEX (
KEEPFILTERS ( VALUES ( 'Company'[Names] ) ),
CALCULATE ( AVERAGE ( 'Values'[Values] ) )
)
)
)
RETURN
IF ( ISINSCOPE ( 'Table'[Category] ), NormalAverage, SumOfAverage )
Hi @lucashmcury
Please try
Average of Values average per Company Names =
VAR NormalAverage =
AVERAGEX (
KEEPFILTERS ( VALUES ( 'Company'[Names] ) ),
CALCULATE ( AVERAGE ( 'Values'[Values] ) )
)
VAR SumOfAverage =
SUMX (
VALUES ( 'Table'[Category] ),
CALCULATE (
AVERAGEX (
KEEPFILTERS ( VALUES ( 'Company'[Names] ) ),
CALCULATE ( AVERAGE ( 'Values'[Values] ) )
)
)
)
RETURN
IF ( ISINSCOPE ( 'Table'[Category] ), NormalAverage, SumOfAverage )
thank you!
you are a master!
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |