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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Deermeat
Resolver I
Resolver I

Allow User to Choose Average Line to Include into The Line Graph

Hello,

I'm trying to create a line graph that can have 2 types of line. First is individual issuer's line that I have already completed.

Second is to allow users to choose the average line that they want to include into the graph. This is done with a bunch of slicers that is provided. Ideally when the user click on the options in the slicers, the average line will be automatically included into the graph.

So if I click industry 1, industry 10, and rating 1, the 3 lines will appear on the graph with the name of the chosen item beside it.

 

Ideal Result:

Untitled.png

 

Sample Data:

https://drive.google.com/file/d/1ASqkyyz4DlDltZDk_vjGw-8vcZ0KdrKq/view?usp=sharing

 

Thank you!

1 ACCEPTED SOLUTION
Deermeat
Resolver I
Resolver I

I gave up on trying to get it into the same graph and just overlay another graph ontop of it with the background set to transparent. 

View solution in original post

3 REPLIES 3
Deermeat
Resolver I
Resolver I

I gave up on trying to get it into the same graph and just overlay another graph ontop of it with the background set to transparent. 

amitchandak
Super User
Super User

@Deermeat , Create an average measure using these values

example

calculate(Average(Table[Value]), Allselected)

 

In the analytics pane, Use Y-axis Constant line, Then under the line option use fx and use this new measure

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak,

Hi I tried your method by using this measure:

 

Average = CALCULATE(AVERAGE(Data1[IssuerScore]), ALLSELECTED())

 

However, the average line that result from it is a constant line that doesnt not change no matter what is being chosen or even not chosen in the slicer. Also, it seems unable to take 2 choices from the slicer and generate 2 different lines. 

Untitled.png

Do you have any idea how to fix this?

Sample File: https://drive.google.com/file/d/1ASqkyyz4DlDltZDk_vjGw-8vcZ0KdrKq/view?usp=sharing

 

Thank you

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.