cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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

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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors