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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors