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

Dynamic Reference Lines in Legend

 

Is there a way to include the average line (or any of the dynamic reference lines) into the visual's legend?

 

4 REPLIES 4
Anonymous
Not applicable

@JRocas, what type of chart are you using? One potential option could be to create a measure for the average (or whatever other reference you are looking for) and then graph that in your chart alongside your other measures. That would then add the reference to the legend.

 

This would likely only work for line charts or for bar charts (if you change to combo chart and put the average measure as the line).

I'm using a line chart. Thanks for your input. However (this comment is more directed to Power BI developers), having to create a measure for the average in order for it to show in the legend takes away from the convenience of using dynamic reference lines. Convenience is especially relevant for users like myself who don't have a developer/coding background to build measures on the fly.

@JRocas

 

In Power BI Dekstop, the line chart can't generate dynamic average lines automatically. @Anonymous is correct. In a line chart, one line means a field, so to include average line, you have to create average field in your dataset (either calculated column or measure). And it can't be a dynamic aggregation type. You need to define it in your formula. To create an average measure, please refer to formula below:

 

Average Amount = CALCULATE(AVERAGE(Table1[Amount]),ALL(Table1))

Regards,

 

Habib
Continued Contributor
Continued Contributor

In current versions, its not possible.

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.