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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Jessica_17
Helper IV
Helper IV

Totals in Matrix visual should have avg and summation

Hello All,

I have a matrix visual which contains dollars and percentage values. 

I would like the total value for Dollar part show summation and % part should avg of how much rows are being present.

I am not able to perfrom this, can anyone please help?

Jessica_17_0-1698768261345.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Jessica_17 ,

 

I think you can try sumx() function to create a new [Dollars] measure based on old one.

NewDollars =
SUMX ( VALUES ( 'TableName'[Quarter] ), [Dollars] )

 

Best Regards,
Rico Zhou

 

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

7 REPLIES 7
Ritaf1983
Super User
Super User

Hi @Jessica_17 
Try this 2 measures :

Dollars_ = sum('Table'[Dollars])
%plan_ = sum('Table'[%Plan])/DISTINCTCOUNT('Table'[Quarters])
Ritaf1983_0-1698823422771.png

Pbix is attached.

If it still doesn't work 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

HI @Ritaf1983 
Thanks for the solution, for percetage part it is working successfully, but for dollars part , I have if condition and which I am calling various measures to get sum, in that situation I cannot apply sum(), can you please provide another solution for this part

Anonymous
Not applicable

Hi @Jessica_17 ,

 

I think you can try sumx() function to create a new [Dollars] measure based on old one.

NewDollars =
SUMX ( VALUES ( 'TableName'[Quarter] ), [Dollars] )

 

Best Regards,
Rico Zhou

 

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

 

Hi @Jessica_17 
For a more detailed solution, i need data to work with ...
so 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hello @Ritaf1983 

QuarterBPTYBP - TY
Q145432
Q24367-24
Total88110-22

 

I have BP and TY measure as sum of particular columns
BP -> sum(BP)
TY -> sum(TY)

BP- TY -> if(isblank(TY),0,BP - TY)
but total value are showing different regardless of what quarter is selected, and currently I have 4 quarters

Total100127-27

It is ignoring any filters applied, and showing total of whole data in matrix visualization.

Hi @Jessica_17 

This is the table of the final results of the calculations, not data that can be worked with. Please share the table of the raw data. If some of the columns are sensitive, please keep only what is relevant to the question.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hello @Ritaf1983 

This is the raw table A

codewm_yearwm_monthwm_quarterAmtDept
6.52E+0820226Q21000D46
5.65E+0820226Q278789D46
5.64E+0820226Q234534D46
5.72E+0820226Q24657D46
5.81E+0820226Q234231D64
5.56E+0820227Q245645D64
5.67E+0820227Q26768D64
5.74E+0820227Q25454D64
28887320227Q23453D64
5.86E+0820227Q23453D64

This is raw table B

codeomni_dept_nbrplan
########460
4677560460
4696115460
4630555460
258399460
########640
4664251640
########640
########640
4073687640

 both are connected via column code-> B to A -> one to many
BP = sum(B[plan]) 
TY = sum(A[Amt])
BP - TY = IF(ISBLANK([TY]),0,([BP] - [TY]))

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.