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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Static Trend Line for Column Chart

Hello Community - 

 

I have a basic measure that is calculating the weekly average based on a the selected date ranges.

Measure is:  

Wkly Avg = DIVIDE(Total POs, ISO Wk Count, 0 )

 

Total POs is a basic SUMX measure and ISO week count, just counts the number of weeks within the date range selected.

 

What I am looking to do, is to show that specific average across the entire column chart and only will move up or down based on data that is sliced.  I would like to see something similar to below with the red dashed line being that average that is calculated based on the above measure.

Avg Line.PNG

Thanks in advance for any help!

Ryan

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Is the gif similar to your expected output?

test.gif

 

You can create a new date table from your fact table:

 

Date = values(fact[date])

 

Then use the new date column as slicer for you to select date range you want. And then you can use the following measure as average lines

 

Wkly Avg = CALCULATE(DIVIDE(Total POs, ISO Wk Count, 0 ),TREATAS(VALUES('Date'[date]),'fact'[date]))

 

You can refer to the sample pbix file.

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

4 REPLIES 4
negi007
Community Champion
Community Champion

@Anonymous you can use quick measure to create a rolling weekly average and then use this in the line values that should do the job for you. 

 

To create quick measure, right click on your base column and then select quick masure.

 

negi007_0-1621263018746.png

pl. try this and write back if you face any issue. thanks




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



Proud to be a Super User!


Follow me on linkedin

negi007
Community Champion
Community Champion

@Anonymous if you want to have a average trend line in your chart that you can have easily from analytics tab -> average line. This will use your chart data and according to the time period selected will change

 

negi007_0-1621261660154.png

 

in case you wish to achieve anything else, please write back. thanks




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



Proud to be a Super User!


Follow me on linkedin

Anonymous
Not applicable

@negi007 thanks for the response, unfortunately average lines are not available in the analytics pane for the combo charts.  So I am looking to create it as a measure so that I can get the result that you are showing above.

Hi @Anonymous ,

 

Is the gif similar to your expected output?

test.gif

 

You can create a new date table from your fact table:

 

Date = values(fact[date])

 

Then use the new date column as slicer for you to select date range you want. And then you can use the following measure as average lines

 

Wkly Avg = CALCULATE(DIVIDE(Total POs, ISO Wk Count, 0 ),TREATAS(VALUES('Date'[date]),'fact'[date]))

 

You can refer to the sample pbix file.

 

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

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.