Join 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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I created a matrix and the Totals in summing all the rows, but I need the highlighted totals to show an average. Any idea's on how I can make this work? Example: I want 248 to be 124, which is the average of 127 and 121.
Solved! Go to Solution.
Hi @jonnyA ,
A simple example:
Measure =
IF (
NOT ( HASONEVALUE ( 'Table'[YearMonth] ) )
&& SELECTEDVALUE ( 'Table'[Product] ) IN { "B", "C" },
AVERAGE ( 'Table'[Value] ),
SUM ( 'Table'[Value] )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jonnyA ,
A simple example:
Measure =
IF (
NOT ( HASONEVALUE ( 'Table'[YearMonth] ) )
&& SELECTEDVALUE ( 'Table'[Product] ) IN { "B", "C" },
AVERAGE ( 'Table'[Value] ),
SUM ( 'Table'[Value] )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @Icey Icey, Thanks for your answer!!!
But I need help plugging in the formula you provided, i'm a beginner level Power BI analyst.
You provider this formula ...
Measure =
IF (
NOT ( HASONEVALUE ( 'Table'[YearMonth] ) )
&& SELECTEDVALUE ( 'Table'[Product] ) IN { "B", "C" },
AVERAGE ( 'Table'[Value] ),
SUM ( 'Table'[Value] )
)Here are the Fields I have for the dataset mentioned ...See pic for the "Fields" I have to work with.
Hi @jonnyA ,
Sorry to reply late. Please try this:
Measure =
IF (
(
NOT ( HASONEVALUE ( 'Table'[YearMonth] ) )
&& SELECTEDVALUE ( 'Table'[Product] ) IN { "B", "C" }
)
|| (
NOT ( HASONEVALUE ( 'Table'[YearMonth] ) )
&& NOT ( HASONEVALUE ( 'Table'[Product] ) )
),
AVERAGE ( 'Table'[Value] ),
SUM ( 'Table'[Value] )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I think I am close to getting this formula to work.
Here is the formula that Icey gave me, but I did tweak it some (Probaly easier to read in the screenshot I provided)...
Hi @jonnyA ,
Are these the names of multiple measures? The value field is not just one measure?
Best Regards,
Icey
@jonnyA - If you can identify those rows somehow like HASONEVALUE or ISINSCOPE, probably, see MM3TR&R - https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-...
Would need sample data to be more specific. Or a more encompassing screen shot.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 26 | |
| 17 | |
| 13 | |
| 10 | |
| 10 |