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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
brunohelder
Frequent Visitor

Display the quarterly average on a Matrix

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.

 

Capture.PNG

9 REPLIES 9
Anonymous
Not applicable

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:

vtianyichmsft_0-1710210558193.png

 

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.

Anonymous
Not applicable

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

brunohelder_0-1710352386744.png

 

Anonymous
Not applicable

Hi @brunohelder ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1710380379513.png

 

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 )

 

brunohelder_0-1710441893341.png

 

Anonymous
Not applicable

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:

brunohelder_0-1710496306163.png

But if I Keep the Filter ALL on my formula it disregards others filters that I have and that I need.

Anonymous
Not applicable

Hi @brunohelder ,

 

Change ALL to ALLSELECTED to try it out

 

Best regards,
Community Support Team_ Scott Chang

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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