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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
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.