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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Stuznet
Helper V
Helper V

How to Calculate Average Based on Column

Hi guys,

 

I don't know how to explain better, but I'm struggling to find a solution to it. My question is, how do I create another average of "Enterprise" measure that is based on a column? like in Jan

 

Capture.PNG

Here is my measure

Measure = DIVIDE(SUM(Data[Unit Cost]),SUM(Data[Total]),BLANK())

 

Here is the dummy report pbix

 

Thanks a lot

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Stuznet

 

Try this measure in values of the matrix visual you have in the file. And set row subtotals to On

 

Measure2 =
AVERAGEX (
    VALUES ( Data[Region] );
    DIVIDE (
        CALCULATE ( SUM ( Data[Unit Cost] ) );
        CALCULATE ( SUM ( Data[Total] ) )
    )
)

 

Code formatted with   www.daxformatter.com

View solution in original post

2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @Stuznet

 

Try this measure in values of the matrix visual you have in the file. And set row subtotals to On

 

Measure2 =
AVERAGEX (
    VALUES ( Data[Region] );
    DIVIDE (
        CALCULATE ( SUM ( Data[Unit Cost] ) );
        CALCULATE ( SUM ( Data[Total] ) )
    )
)

 

Code formatted with   www.daxformatter.com

@AlB Thank you so much, this is exactly what I've been looking for.

Capture.PNG

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.