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
Anonymous
Not applicable

Create Custom Average Line In Line Chart ( to avoid skewed value)

How can I create a custom Average Line? I am counting records created by year, but I don't want the average based on inclusion of the first year (2005). The average on the bottom is what i am aiming for , but it doesn't display the skewed value in the solid line, which i need to include.

Skewed Average.png

1 ACCEPTED SOLUTION
SriKandimalla
Helper I
Helper I

Hello @Anonymous ,

 

You can create a new average measure using DAX as follows,

 

AverageMeasure = CALCULATE(AVERAGE(column_name),FILTER(table_name,tablename[year]<>2005))

View solution in original post

2 REPLIES 2
SriKandimalla
Helper I
Helper I

Hello @Anonymous ,

 

You can create a new average measure using DAX as follows,

 

AverageMeasure = CALCULATE(AVERAGE(column_name),FILTER(table_name,tablename[year]<>2005))

Anonymous
Not applicable

Thanks @SriKandimalla , This helped me to see what I was doing wrong in how I implemented my dax expression.  I also needed to implement as a calculated column instead of a measure to get the constant line on the chart. The only tradeoff of this custom way is that I can't format the line to show the average like I can using the analytics pane average line. Turning on the data label will show the average datapoint on all years.

Custom Avg Line.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.