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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How can we add average line to stacked area chart in Power BI

Hi All,

 

I need to add average line to stacked area chart in Power BI. Currently only constant line option is available in the analytics pane. Is there any custom visual for the same?

Can you please help me with this.

 

Thanks,

Vamika

6 REPLIES 6
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

I believe other custom visuals also will need a field for line value. Create a measure for average and use Line and Stacked column chart will be a good choice.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
az38
Community Champion
Community Champion

@Anonymous 

you can add a measure like 

CALCULATE(AVERAGE(Table[Value]), ALLSELECTED(Table))

and put it as line to Line and Stacked Column chart visual


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 - I am aware of the solution that you shared but I want stacked area chart only.

az38
Community Champion
Community Champion

@Anonymous 

line and stacked is the same as stacked + constant line


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
amitchandak
Super User
Super User

@Anonymous , You can create a line stacked visual and use a measure like this and use it on the line

 

Avg = calculate(Average(Table[Col],all(Table))

 

Avg = calculate(Average(Table[Col],allselected(Table))

Anonymous
Not applicable

I dont want line stacked visual. I want stacked area chart only along with the average line.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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