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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to create measures that keep steady value

I am working on creating a control chart to show average cost each month in the past 12 months. I have created a Line Chart visual with month on the x-axis and average cost per month on the y-axis. On top of this I need to create measure to the overall average of all cost values in my data table. However, each measure I have created ends up being a line with the exact same values as what is already plotted.

 

How can I create a value that can be plotted on the line chart that will be the same for every month? Using an average trend line will work, but for the upper and lower control limits this will not. If it is possible to create a measure of the overall average, then in theory, the same DAX forumla can be used by switching the AVERAGE() function with STDEV.S() function.

 

My data looks like the following:

 Month YearTotal Cost
820192450
220202600
320198745.51
420196946.67
920192478.01
102019784.9
220203237.59
620192623.99
2202014399.12
920194273.02
102019922.5

 

My Line Chart Looks like the following:

Spend Control Chart.PNG

 

Any insights would be appreciated!!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

You need to do a measure similar to this

Total average = CALCULATE (AVERAGE(Table[Total Cost]) ; ALL(Table[Month]))

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Please refer to the measure below.

Measure = CALCULATE(AVERAGE('Table'[Total Cost]),ALLEXCEPT('Table','Table'[ Year],'Table'[Month]))

8.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

MFelix
Super User
Super User

Hi @Anonymous,

You need to do a measure similar to this

Total average = CALCULATE (AVERAGE(Table[Total Cost]) ; ALL(Table[Month]))

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.