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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone.
I'm struggling with making my Matrix visual show the average of the column.
Note that the values for each row are averages as well. This is the DAX I've used:
Solved! Go to Solution.
Hi @Bobbys ,
COGS_ending1 =
VAR _COGS_ending1 =
AVERAGEX ( VALUES ( 'calendar'[Time period sort] ), [COGS previous period] )
VAR _SUMMAIRZE =
SUMMARIZE (
'Table',
[Product],
"COGSendring1", AVERAGEX ( VALUES ( 'calendar'[Time period sort] ), [COGS previous period] )
)
RETURN
IF (
HASONEVALUE ( 'Table'[Product] ),
_COGS_ending1,
AVERAGEX ( _SUMMAIRZE, [COGSendring1] )
)
In my sample, the [COGS previous period] part equal to average(table[]value]). Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anyone?
Hi @Bobbys ,
COGS_ending1 =
VAR _COGS_ending1 =
AVERAGEX ( VALUES ( 'calendar'[Time period sort] ), [COGS previous period] )
VAR _SUMMAIRZE =
SUMMARIZE (
'Table',
[Product],
"COGSendring1", AVERAGEX ( VALUES ( 'calendar'[Time period sort] ), [COGS previous period] )
)
RETURN
IF (
HASONEVALUE ( 'Table'[Product] ),
_COGS_ending1,
AVERAGEX ( _SUMMAIRZE, [COGSendring1] )
)
In my sample, the [COGS previous period] part equal to average(table[]value]). Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the response @amitchandak.
I've tried that already. The problem with that is that my totals dissapear when using Values(Table[Product]).
No idea why...
@Bobbys , if the product is above the time then it needs to like
COGS endring1 = AVERAGEX(VALUES('Product'[Product]), [COGS previous period])
till product level follow aggregation of measure - COGS previous period
post that avg of products
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 124 | |
| 101 | |
| 67 | |
| 49 |