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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
CetinT
Frequent Visitor

Average of a measure by category

Hi All,

 

I want to calculate average of Item Cost/NetPrice % column by Subcategory. This column is a measure. Could you help me about this? 

It has to be like (28,01%+41,43%+23,98%)/3(Carpaccio category has 3 Item)=31,14% after this I will compare Item Cost/NetPrice % with new average. This has to be for each subcategory.

 

Capture2.JPG

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @CetinT 

please try

Subcategory Average =
AVERAGEX (
CALCULATETABLE ( VALUES ( 'Product'[Product] ), ALL ( 'Product'[Product] ) ),
[Item Cost/NetPrice %]
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @CetinT 

please try

Subcategory Average =
AVERAGEX (
CALCULATETABLE ( VALUES ( 'Product'[Product] ), ALL ( 'Product'[Product] ) ),
[Item Cost/NetPrice %]
)

Thanks a lot. This measure solved my problem. 👋

andhiii079845
Solution Sage
Solution Sage

Please show the underlaying data structure. Are there measures or other tables involved? 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




There is Product and Transaction tables. Max Net Price and Max Cost Price are measures and dividing Max Cost Price to Max Net Price to finding ItemCost/NetPrice % as a measure

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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