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
I have a matrix that is counting the rows of a table by month of activity. I would like to add to the right the quarterly average of the activity.
Hi @brunohelder ,
If you need to show the quarterly average, you can change sum to average. if you need to add a column, you can check the following results:
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for the reply.
I could not get it to work.
Your example has a table with date and the number amount for the date.
In my source table each entry is a line with a date and the quantity is 1 (one observation). The screenshot that I have sent is a count of the lines by date (Date Hierarchy). If I do an Average I get 1.
Hi @brunohelder ,
Can you provide sample data, so that we can better solve the problem for you.
Best regards,
Community Support Team_ Scott Chang
I am not able to attach files... Please find an example

Hi @brunohelder ,
I made simple samples and you can check the results below:
AVG Count = var _t = ADDCOLUMNS('Table',"A",COUNTAX(FILTER(ALL('Table'),[Date].[Quarter]=EARLIER([Date].[Quarter])),[ID]))
RETURN DIVIDE(AVERAGEX(_t,[A]),3)
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
On my data the average on the months it is not the same as in the sample.
I don't understand why.
I had to change a bit the formula because you where filtering ALL the table and I don't want that.
Average activity per Quarter (IN) =
VAR _t =
ADDCOLUMNS (
Table,
"A",
COUNTAX (
FILTER (
( Table),
Table[ Date [.[Quarter]
= EARLIER ( Table[ Date].[Quarter] )
),
Table[ID]
)
)
RETURN
DIVIDE ( AVERAGEX ( _t, [A] ), 3 )
Hi @brunohelder ,
Because in my expression I fixed that there are three months in a quarter, even though there is no value.
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
It seems to be related to the "FILTER (ALL" that you have.
If I remove the ALL from your formula it changes:
But if I Keep the Filter ALL on my formula it disregards others filters that I have and that I need.
Hi @brunohelder ,
Change ALL to ALLSELECTED to try it out
Best regards,
Community Support Team_ Scott Chang
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 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |