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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mikeoshields
Helper I
Helper I

Column Calculations in a Matrix

I have a PowerBI matrix of 6 columns of data...see below. The values are the sums of the last 6 months. 

mikeoshields_1-1615223520947.png

 

The example Excel worksheet below averages those 6 columns and does other calculations that I need to do in the PowerBI matrix but I can't seem to figure out how to get the average of the columns.  The only value that I can get is the grand total of the row but, again, I need average as well as other calcuations.

mikeoshields_0-1615223331089.png

 

Thanks

 

5 REPLIES 5

You need to post

* your table structure

* your relationships

 

if you don't do this, it's like phoning your mechanic and saying "my car won't start, what's wrong"?



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

I know I know...the thing is we're a DOD supplier so I have to be VERY careful.  Let's attack this from a different perspective (forget the actual data)...What is the right way to get the average of values in a matrix (see below)?  Again, in this case QTY_LOCATION is pivoted into monthly totals.  I just need to get the average of the monthly totals in a measure or column (not sure which).  If this isn't sufficient, I will make up some data since I can't send my raw data.

 

mikeoshields_0-1615407122139.png

 

1. get a calendar table https://exceleratorbi.com.au/power-bi-calendar-tables/

2. understand why totals don't add up https://exceleratorbi.com.au/use-sum-vs-sumx/#totals



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

You have not provided enough information

https://community.powerbi.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Quickly/m-p...



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

My apologies for not providing enough info.  The Excel data below is the result of a pivot.  After pivoting, I average the row for the 6 columns (Average Consumption) and do other math.  I need to do the same thing in PowerBI

 

mikeoshields_0-1615392104198.png

 

 

However, when I do a simple AVERAGE('Table'[Column]) in PowerBI in a Matrix, I do not get 23222.5.  I get 209.47 and I have no idea why.  Is there something extra that I need to in order to average values in a matrix?

 

mikeoshields_1-1615392346839.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors