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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
xlitol
Frequent Visitor

Creating a Average line in line chart which averages days of all teams for every month

Hi - this is a trend line chart of days (y-axis sum of days cnt) of teams (legend TEAM) every month (x-Axis start_date_chop_mmyy). I need a line which averages the team count of teams every month. The default average line is a horizontal straight line which does not fit my requirement. I have one table - Main which is the data source. To the right are some filters applied to this chart (namely - absence_type, Active_status, start_date_chop_, team).

 
I guess DAX is required to write a measure for this. May I know how to do it? Not creating new table is preferred.

 

xlitol_0-1683100586073.png

xlitol_1-1683100858373.png

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi  @xlitol ,

 

You can use the following measure:

Measure =
AVERAGEX(
    FILTER(ALL('Table'),
    YEAR('Table'[Start_Date_Chop_MMYY])=YEAR(MAX('Table'[Start_Date_Chop_MMYY]))&&
    MONTH('Table'[Start_Date_Chop_MMYY])=MONTH(MAX('Table'[Start_Date_Chop_MMYY]))),[Days Cnt])

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

xlitol
Frequent Visitor

any help is appreciated to get me started

 

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors