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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BlackDevX
Regular Visitor

Conditional calculation in Matrix visual using Excel's SUMPROD function

Hello PBI Community,
@Greg_Deckler 

 

I'm an intermediate level user struggling to do some hocus pocus with a Matrix visual. When Class column is expanded, Average column does an average (i.e., 5, 10, 5, 20), but when collapsed the total displayed in the column is the calculation of the Excel SUMPROD function (i.e., 12). I've been trying and reading on my own for a couple of weeks but haven't had any luck thus far.


Example:

BlackDevX_0-1686875974383.png

Any help is greatly appreciated

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@BlackDevX , Create a new measure

divide(Sumx(Table, Table[Days]*[Average]), sum(Table[Days]) )

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@BlackDevX , Create a new measure

divide(Sumx(Table, Table[Days]*[Average]), sum(Table[Days]) )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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