PowerBI.tips

Center the X-Axis on a Line Chart

July 9, 2018 By Seth Bauer
Center the X-Axis on a Line Chart

Sometimes when your working on a line chart you want the x-axis to stay centered on a chart. This tutorial will walk you through how to create an X-Axis that will always center it’s self on the graph.

Video Support Material:

The measures discussed within this tutorial are:

Variance All = SUM(Sales[Variance])

The column name Variance is found in the data table called sales.  This is just a numerical column.

After summing up all the variances we can calculate the min and max lines.

Const Max Line = [Variance All] * 1.2

Const Min Line = -1 * [Const Max Line]

Finally to calculate the variance to date you can use this filtered measure, which will only produce historical values.

Variance To Date = CALCULATE([Variance All], FILTER(‘Sales’,‘Sales’[Date] <= EOMONTH(TODAY(),0)))

Thanks for watching our short tutorial.  If you like this video please be sure to follow me (Seth Bauer) on Twitter, LinkedIn and be sure to subscribe to the PowerBI.Tips YouTube channel.

Previous

Power BI and Sudoku – Yes Please

More Posts

Nov 20, 2026

What is Shadow AI? - Ep.582

Mike Carlo and Tommy Puglia look at shadow AI, where employees use their own AI tools whether or not company policy allows it, and compare it to the early days of shadow IT and self-service Power BI. They discuss the risks, who owns prompts and skills built on personal subscriptions, and why organizations are better off giving people sanctioned tools.

Nov 18, 2026

Exploring Database Hub - Ep.581

Mike Carlo and Tommy Puglia explore Database Hub in Microsoft Fabric, the preview control plane for monitoring SQL, PostgreSQL and Cosmos DB databases across Fabric, Azure and on-premises. They debate who it is really for, and what it can and can't do today.

Nov 13, 2026

Making Data AI Ready - Ep.580

Mike Carlo and Tommy Puglia work through James Serra's series on making data AI-ready, from data quality and business definitions to where instructions for agents should live. They also cover CI/CD for Fabric Warehouse, OneLake as native storage for Azure Databricks, and a Chicago user group session on the Power BI Desktop Bridge.