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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aar0n
Advocate II
Advocate II

adding a measure to a line chart with a legend

I have a data table with date, name, and Value. 

I am trying to plot the date and value for each name on a line graph, In addition to an "Average" line. 

this average line will take all selected names and average their values. 

 

currently, there is no way to add the measure to the line graph with a legend.. but i found this workaround, 

https://stackoverflow.com/questions/42862438/powerbi-line-chart-adding-lines-based-on-measures

 

i am trying to implement a similar solution, without having to type out each name.. since i have ~3000 names in my dataset. 

 

 

i'm hoping for a solution where i can either follow the steps from the posted link, or some sort of way to append the names selected in the filter, into another table that will have the "Name" and then the "average" appended to the bottom as a new name.

 

thanks!

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @aar0n,

 

If you want make the measure dynamic, you can modify the measure like this. Then add a slicer 'table1'[Cat]. 

Cat1 Sales =
CALCULATE ( [Sales], 'Your Table Name'[Sales Category] = MIN ( 'table1'[Cat] ) )

If you want to add 3000 measures, I'm afraid it isn't supported by now. Please vote up an idea here.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The issue with that one, is that i don't have a [Sales] measure in my table..

i have a column that doesnt need to be split up more.. i am hoping to plot an "x"-number of lines in the background, and then a line that has the dynamic average of all of the lines (which is the Red dashed line in the front of the example).. i have attached a screenshot from google images for reference.. it is just about exactly what i am looking for.. 

 

 

 

 

Google images description of a type curve.PNG

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.