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
cooke01
New Member

add an average line on a Line and Clustered Column Chart

Hi,

 

I have a simple data set that I need to show an average for as a line over a bar graph.  I have about 8 years of data with only two columns Date and Appointment Type. I have created a basic column visual that lets me see how many of each appointment type we have completed in each day, month etc.

 

I would like to have a calculation that sits over the top that shows what the average in that time period has been for that particular set of filtered appointment types and time period. So for example if I am looking at the last 12 months I would like to see what the average number of that appointment type has been over that past 8 years for each month to see how we are performing. If I am looking at the quarter again have it automatically change to show the average for the QTR. 

 

Thanks in advance for the advice. 

2 REPLIES 2
Anonymous
Not applicable

HI @cooke01,

 

According to your description, you want to create dynamic average line of current selected date range, right?
If this is a case, you can try to use below measure to calculate the dynamic average:

Dynamic Average= IF(ISBLANK(MAX(Table[Date]))=FALSE(),CALCULATE(AVERAGE(Table[Amount]),ALLSELECTED('Table')))

2.PNG3.PNG

 

Regards,

Xiaoxin Sheng

JDLee23
Helper I
Helper I

Hi,

 

Probably the easiest way to do this is to use the 'Analytics' feature on the bar graph. Underneath the various visualisations, in the same area where you put the data types into a visual, there should be magnifying glass with a line chart within it (select your bar graph first!).

 

This will then give you options to add various lines, including an average line, which will automatically filter to show the average of the data in the bar chart, as filtered by any slicers on the data.

 

Hope this helps!

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.