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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
WTAS80486
Helper IV
Helper IV

Creating average as a line in line and bar chart

I have calculated Mean by site for all assets under one site

 

Mean = DIVIDE('Table'[Hours],Table[F]) , Hours and F are measures in Table
 
This gives Mean for each site

 

Ankita80486_0-1660857349000.png

 

Now I need to create a line for Average on this chart which would give total Hours for all 4 sites combined/Total F for all 4 sites combined ( to comapre site average with total average) 

 

Using the same Mean as line dosent help

 

Ankita80486_1-1660857860856.png

 

 

1 ACCEPTED SOLUTION
daXtreme
Solution Sage
Solution Sage

// NOTE: Measures should never be preceded by
// the table name they sit in. On the other
// hand, columns should always be preceded
// with the name of the table they belong to.

Mean = DIVIDE( [Hours], [F] )

// Assuming that your measures aggregate
// correctly...
[Overall Mean] = 
  CALCULATE(
    [Mean],
    ALLSELECTED( T[Site] )
  )
  
// or if the above doesn't work (but it should)...

[Overall Mean] = 
DIVIDE(
  CALCULATE(
    [Hours],
    ALLSELECTED( T[Site] )
  ),
  CALCULATE(
    [F],
    ALLSELECTED( T[Site] )
  )
)

View solution in original post

2 REPLIES 2
daXtreme
Solution Sage
Solution Sage

// NOTE: Measures should never be preceded by
// the table name they sit in. On the other
// hand, columns should always be preceded
// with the name of the table they belong to.

Mean = DIVIDE( [Hours], [F] )

// Assuming that your measures aggregate
// correctly...
[Overall Mean] = 
  CALCULATE(
    [Mean],
    ALLSELECTED( T[Site] )
  )
  
// or if the above doesn't work (but it should)...

[Overall Mean] = 
DIVIDE(
  CALCULATE(
    [Hours],
    ALLSELECTED( T[Site] )
  ),
  CALCULATE(
    [F],
    ALLSELECTED( T[Site] )
  )
)

@daXtreme Thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.