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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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')))

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')))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

May 2025 Monthly Update

Fabric Community Update - May 2025

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