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
Anonymous
Not applicable

Average of table

i have a matrix table as per screenshot with setup

 

recalc average.pngrecalc average2.png

what i would like to achieve is create a column on the right with the average of the 5 columns totals 

Stuck on how to achieve this. tried a few different methods and getting incorrect results. essentially my output should look similar to this for the FY18/19 period

FY18/19Product1 Product2 Product3Product4 Product5Average
    Q120.3175.00311.300.00554.60192.24
    Q2249.000.001446.97148.001115.95591.98
    Q3137.5015.00473.4014.62575.08243.12
    Q4420.2515.25134.0094.71768.70286.58

 

thanks

1 ACCEPTED SOLUTION

Hi,

 

Is this data in your screenshot the sum value for each product?(Simplely means one product has more than one value for each Year/Q)

If so, i create two new tables to test:

12.PNG   13.PNG

Create a sum measure for each product of each Year/Q:

Measure = SUM('Product'[Values])

Then create an average measure for each Year/Q:

Average = CALCULATE(SUM('Product'[Values]),ALLEXCEPT('Date','Date'[Q],'Date'[Financial Year]),ALLSELECTED('Product'[Product]))/3

Choose these two measures and follow my previous reply's steps, it shows:

14.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

8 REPLIES 8
v-gizhi-msft
Community Support
Community Support

Hi,

 

According to your description, i create a table to test:

91.PNG

Then create a column to calculate average values for each Q:

Average = CALCULATE(AVERAGE('FY Table'[Values]),ALLEXCEPT('FY Table','FY Table'[Q]))

Add this column to the matrix columns field, it shows:

92.PNG

Then turn off 'Word Wrap' and hide the first four average, and it shows:

93.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

@v-gizhi-msft 

 

thanks for the reply

 

im a bit confused as to why you created a table to display the average or was that to just get the ouput?

possibly i wasnt clear in my original output. the columns are the totals for each product per quarter but then i wish to get the average at the end



Hi,

 

The average values in my screenshot is the average result from five products for each Q.

Please review my original screenshot and you will find that the average columns for each product are the same.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

@v-gizhi-msft 

 

thanks

ive been still racking my brain as my average output seems to be wrong and im not sure what i am doing wrong

 

recalc average3.png

 

my formula is

Average = CALCULATE(AVERAGE('Service Reliability'[Re-calculated Downtime]),ALLEXCEPT('Service Reliability','Date'[Financial Year],'Date'[FY Quarters]))

 

my Financial Year and FY Quarters is based on a separate date table. the linked column in my main table is just called "Date"

recalc average4.png

 

100% know im doing something wrong with my formula. ive tried multiple different ways after reading blogs and DAX on allexcept



Hi,

 

Could you please tell me the relationship between your main table and date table? one-to-one or one-to-many or many-to-many?

Also i notice that your formula is a little different from my original formula, please try to change the table in ALLEXCEPT function:

Average = CALCULATE(AVERAGE('Service Reliability'[Re-calculated Downtime]),ALLEXCEPT('Date','Date'[Financial Year],'Date'[FY Quarters]))

Wait for your reply.

 

Best Regards,

Giotto Zhi

 

 

Anonymous
Not applicable

@v-gizhi-msft  
the relationship is a many-to-one 

 

your change was one i did myself previously and was getting different figures for each column, so i stopped going down that path

 

recalc average5.png

 

 

Hi,

 

Is this data in your screenshot the sum value for each product?(Simplely means one product has more than one value for each Year/Q)

If so, i create two new tables to test:

12.PNG   13.PNG

Create a sum measure for each product of each Year/Q:

Measure = SUM('Product'[Values])

Then create an average measure for each Year/Q:

Average = CALCULATE(SUM('Product'[Values]),ALLEXCEPT('Date','Date'[Q],'Date'[Financial Year]),ALLSELECTED('Product'[Product]))/3

Choose these two measures and follow my previous reply's steps, it shows:

14.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

@v-gizhi-msft 

thats it

 

fantastic

thankyou so much

 

 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.