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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sshaw10
New Member

Line graph with cut off point for average line

Hi. I'm working on an area chart that contains defect counts and a static average of the defect counts. I was able to create a measure that produces a static average line. Now, I want to have the average line cut off to the current month and update when new data is refreshed each month. 

Current measure to get average line: 

Average =
CALCULATE ( COUNTROWS('Table Data'), ALLEXCEPT( 'Calendar','Calendar'[Year] ) )
/[Static Month_number]
   sshaw10_0-1666909206385.png

 

 

Any ideas on how to update my current measure to get an average line that cuts off to the current data? (being sept in this case). Thanks. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@sshaw10 , Try this measure for line

 

Averagex(Values(Date[Month Year]), calculate(COUNTROWS('Table Data')))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
sshaw10
New Member

Thanks @amitchandak That measure did the job!

amitchandak
Super User
Super User

@sshaw10 , Try this measure for line

 

Averagex(Values(Date[Month Year]), calculate(COUNTROWS('Table Data')))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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