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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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