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
DAX_pbi_learner
Frequent Visitor

Showing moving averages for multiple years on a line chart

DAX_pbi_learner_0-1698418708144.png

Hello. So the average interval calculations show up correctly when I set up the chart like this and the shape of the graph for each year is exactly how I want it to be when I toggle between daily, 7 day, and 30 day movign averages and hover on the graph for detail data. However, the data for all years is on one line. I'd like it to be separate for each year (to show comparision) and have the x-axis as months.

 

When I adjust the date hierachy to get the x-axis to display Months and have the lines for each year separately as I'd like, I am unable to get the data to look as I like aka continuous.

 

 

DAX_pbi_learner_1-1698420597333.png

@amitchandak 

3 REPLIES 3
DAX_pbi_learner
Frequent Visitor

Thanks @lbendlin I was able to get the chart to look how I wanted by using a date column for one year:

DAX_pbi_learner_0-1698848670263.png

I randomly picked all days in 2020 for the x axis...however, now it shows up as Jan 2020, I would like just Jan to show up..any ideas on how I can go about that?

I even changed the format type but that doesn't seemt to affect the line Chart X-Axis

DAX_pbi_learner_1-1698848876787.png

 

I think you need to change the format directly on the visual, not in the base table.

lbendlin
Super User
Super User

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.