Reply
tyjames05
Helper I
Helper I
Partially syndicated - Outbound

Power Bi Pro Desktop Trouble with average in Matrix table

Hello all,

 

I'm having trouble with the average in my matrix table. I've looked at other threads with similiar problems and I don't seem to figure it out. I have a column in my table call "PPH". I want the average of the PPH to show up in the "Total" at the bottom. I'm affaird its giving me the total PPH dividied by the number of days. The numbers aren't coming out correctly. The PPH is basically the "Finished Product" divided by the number of hours worked. Any help would be greatly appreicated. 

 

tyjames05_0-1701728001689.png

 

1 ACCEPTED SOLUTION

Syndicated - Outbound

Hi, @tyjames05 

 

You can try the following methods.

Measure:

PPH = AVERAGEX(ALL('Table'),DIVIDE(SUM('Table'[Finished Product]),SUM('Table'[Hours Worked])))

vzhangti_0-1701929080814.png

Is this the result you expect? Please see the attached document.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
CoreyP
Solution Sage
Solution Sage

Syndicated - Outbound

I think you want to use AVERAGEX

Syndicated - Outbound

Here is how the table looks. Can you show me how to type out the averagex code?

 

tyjames05_0-1701731473560.png

 

Syndicated - Outbound

Hi, @tyjames05 

 

You can try the following methods.

Average = AVERAGEX('Table',[PPH])Average = AVERAGEX('Table',[PPH])

vzhangti_0-1701844252881.png

Is this the result you expect? Please see the attached document.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicated - Outbound

tyjames05_0-1701882769467.png

When I'm putting in the date to the spreadsheet, I have a column for PPH. I manually put this in. Lets say we left it out and we created a new measure to divide the finished product by total hours worked, would that then create the correct PPH in the total row at the bottom?

Syndicated - Outbound

tyjames05_0-1701879254050.png

It gives me an error. If you look back at the original table. The PPH value at the bottom in the "Total" row should be Finished Product divided by Sum of Hours worked. We take the number of pieces produced and divide that by the number of hours worked. This gives us the operators pieces per hour metric. The PPH in the Total row now is not accurate. It should read 46.87 because 5508/117.51 is 46.872606 but we only use two decimal spots, so 46.87.

 

Syndicated - Outbound

Hi, @tyjames05 

 

You can try the following methods.

Measure:

PPH = AVERAGEX(ALL('Table'),DIVIDE(SUM('Table'[Finished Product]),SUM('Table'[Hours Worked])))

vzhangti_0-1701929080814.png

Is this the result you expect? Please see the attached document.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicated - Outbound

Hey I have another question for you. It's in the same report. I'm trying to add these 3 columns to get a total.. and the DAX formula that I'm using is coming out all messed up. 

 

TA = SUMX('RawData', RawDATA[Total Assemblies for Above Cell During Selected Shift]+RawDATA[Total CUT TO LENGTH pieces for Above Cell During Selected Shift]+RawDATA[Total PARFLEX pieces for Above Cell During Selected Shift]
Thats what I'm using. But if you look at the second picture once I select the measure to add to the table it doesn't compute correctly. I think the reason might have to do with somedays there are multiple entries for the same cell. Cell 2 might have multiple entries because part of the day they worked on assemblies and another part of the day they worked on CTLs.

 

tyjames05_0-1704206359050.png

tyjames05_1-1704206440441.png

 

 

Syndicated - Outbound

Very good man. It works.

avatar user

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)