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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Average line of multiple lines in a line chart

Hello,

I have a data as the following:

timeattributevalue
1FIFO12
2FIFO116
3FIFO15
4FIFO164
5FIFO198
6FIFO183
7FIFO18
8FIFO179
9FIFO154
10FIFO280
1FIFO253
2FIFO262
3FIFO265
4FIFO252
5FIFO259
6FIFO260
7FIFO28
8FIFO269
9FIFO248
10FIFO261
1FIFO359
2FIFO324
3FIFO332
4FIFO352
5FIFO31
6FIFO358
7FIFO389
8FIFO329
9FIFO368
10FIFO362



sarah931_0-1702325649751.png

And I am getting the line chart from it while adding a filter for the attribute as above. So my request is that I want to add an average line for the lines checked on the filter whataver that be (FIFO1 and FIFO2 or FIFO2 and FIFO3 or all of them). So for example for the lines choses above the average will be something like the red line that I drew by hand:

sarah931_1-1702325882215.png

 

Any help will be appreciated. I have the sample file but I am unable to share it here.

 

2 ACCEPTED SOLUTIONS
barritown
Super User
Super User

Hi @Anonymous,

You could use each line separately using measures like this one (and not using the Legend option):

Line 1 = SUMX ( FILTER ( Data, [attribute] = "FIFO1" ), [value] )

Then the average measure will be as simple as this:

Avg = AVERAGE ( Data[value] )

Please find the attached file illustrating this approach.

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

View solution in original post

if FIFO is actually greater than 3 you can use my solution

Screenshot_3.png

View solution in original post

4 REPLIES 4
barritown
Super User
Super User

Hi @Anonymous,

You could use each line separately using measures like this one (and not using the Legend option):

Line 1 = SUMX ( FILTER ( Data, [attribute] = "FIFO1" ), [value] )

Then the average measure will be as simple as this:

Avg = AVERAGE ( Data[value] )

Please find the attached file illustrating this approach.

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

Anonymous
Not applicable

Thank you @barritown , this is a brilliant solution. The only problem I had is that the number of FIFO are actually more than 3 in my real data and creating a measure for every FIFO number could be very manual especially that the number of FIFO could change from 7 to 8 or 20.

if FIFO is actually greater than 3 you can use my solution

Screenshot_3.png

Anonymous
Not applicable

This is exactly what I was looking for, @Ahmedx ! Thank you, I appreciate the help.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors