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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
prapatsornchar
Regular Visitor

How to sum average data

Hello,
as you can see, the total sum is wrong

prapatsornchar_1-1653760334183.png

i want to sum of my average data

here is the file : https://drive.google.com/file/d/1JErU8xK8xG49hoN2t0tX2MgI5DPZF3N1/view?usp=sharing

 

Please help,

 

thank you 

Ps: sorry for my language

 

1 ACCEPTED SOLUTION

@prapatsornchar 

You can create a measure as follows:

Avg Inventory = 
IF(
   ISINSCOPE( Sheet1[Sec]),
   AVERAGE( Sheet1[inventory] ), 
   SUMX(
        VALUES( Sheet1[Sec] )  , CALCULATE( AVERAGE( Sheet1[inventory]))
   ) 
)

 

Fowmy_0-1653768969880.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
prapatsornchar
Regular Visitor

Thank you so much, i really appreciate for you help

Fowmy
Super User
Super User

@prapatsornchar 

You are just averaging the Invetory column so at the total level, it returns the average of the complete table. 
What sort result do you want to calculate for the total row?


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

yes, i use average formula for inventory column

but i want sum it

 
from the picture, i want total number to be 21,076.4

(1882+274+1689+337+500+456+118+983.4+381+1265+1101+12090=21076.4)

Fowmy
Super User
Super User

@prapatsornchar 

You file cannot be accessed

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

can you try again?

i already set share option on my google drive

@prapatsornchar 

You can create a measure as follows:

Avg Inventory = 
IF(
   ISINSCOPE( Sheet1[Sec]),
   AVERAGE( Sheet1[inventory] ), 
   SUMX(
        VALUES( Sheet1[Sec] )  , CALCULATE( AVERAGE( Sheet1[inventory]))
   ) 
)

 

Fowmy_0-1653768969880.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors