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
Happy2023_05
Helper I
Helper I

Hot to get Sum of Avg in Matrix

Avg1-1%

Avg2-2%

Avg3- 4%

 

In Matrix when I drag this average measure in total I get avg value-2.3% but I have to get sum=7%.pls help me to achieve  this? 

8 REPLIES 8
tamerj1
Super User
Super User

Hi @Happy2023_05 

please use

SUMX ( 

VALUES ( 'Table'[the slicing by column at rows of the matrix] ),

[Average Measure]

)

or

If you are slicing by multiple columns from different tables then

SUMX ( 

SUMMARIZE ( 'Fact Table', 'Dim Table1'[columnX], 'Dim Table2'[columnY], ... ),

[Average Measure]

)

@tamerj1 

Thank you so much it works. 

But the summation is not correct for integer

Suppose - 7% +0% total showing -8% which is not correct. 

But in decimal it shows correct

7.28%+0.33%=7.61%. 

I want it as integer so value should be 7%. Round function not working for percentage. 

Round(sumx(),avg measure),0).

@Happy2023_05 

Use 

VALUES ( 'Table'[the slicing by column at rows of the matrix] ),

ROUND ( [Average Measure], 0 )

)

I tried it already round(avg measure) gives 0% individual value and sum becomes 0%.this does not work. Is there any other way to achieve it? 

@Happy2023_05 

You wrapped the whole SUMX with ROUND. You need to wrap only the measure inside SUMX 

SUMX (

VALUES ( 'Table'[the slicing by column at rows of the matrix] ),

ROUND ( [Average Measure], 0 )

)

I did the way you mentioned above.Wrapped round function inside sumx not whole sumx. That did not work. It rounds each avg measure value to 0%

@Happy2023_05 

Please provide a screenshot for better understanding of your problem 

Happy2023_05_1-1673198398920.png

 

Happy2023_05_2-1673198440060.png

 

AVG = AVERAGE(Table1[sales%]) .
I could not see any option to attach PBIX file so sharing screenshot.

 

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.

Top Solution Authors