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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors