What is MTD in Power BI?

Cody Schneider

Tracking performance against your monthly goals requires more than just looking at last month's final numbers. You need to see how you're performing right now. This is where Month-to-Date, or MTD, calculations become essential. This article will show you exactly how to create and use MTD metrics in Power BI using DAX formulas.

What is Month-to-Date (MTD)?

Month-to-Date is a time-based calculation that shows the cumulative total of a specific metric from the very first day of the current month up to the current date. It gives you a real-time snapshot of your performance within the current month, helping you stay on track and make adjustments before it's too late.

For example, if today is October 20th and you're looking at your MTD sales, the calculation would sum all sales from October 1st through October 20th.

MTD is a foundational metric for any business dashboard because it helps you:

  • Monitor Progress: Are you on pace to hit your monthly sales quota, traffic goal, or lead target? MTD tells you exactly where you stand.

  • Identify Trends Early: Did sales spike after a recent promotion? Is website traffic dipping unexpectedly this week? MTD analysis helps you spot these patterns as they happen.

  • Make Timely Decisions: If your MTD numbers are lagging, you still have time to run a flash sale, ramp up an ad campaign, or motivate your sales team. Waiting until the end of the month means you’ve lost the opportunity to influence the outcome.

Preparing Your Data: The Importance of a Date Table

Before you can write any time intelligence formulas in DAX (Data Analysis Expressions), Power BI needs a solid foundation to work from. This foundation is a dedicated "Date Table" or "Calendar Table." While you might be tempted to use the date column from your main sales or traffic data, best practice dictates creating a separate table just for dates.

Time intelligence functions in DAX rely on a continuous, unbroken sequence of dates to work correctly. A dedicated date table ensures this requirement is met.

Requirements for a Date Table:

  • A Unique Date Column: It must have a column with the Date/Time data type, and every single value in this column must be unique. No duplicate dates allowed.

  • No Gaps: The date column must include every single day for the time period you're analyzing. Even if you had no sales on a Sunday, that Sunday must exist in your date table.

  • Relationship: The date column in your Date Table must be connected to the date column in your data table (like a "Sales" table or "Sessions" table) via a one-to-many relationship.

  • Mark as Date Table: In Power BI, you must officially designate it as your date table so Power BI knows to use it for time intelligence calculations.

You can create a Date Table using DAX with functions like CALENDARAUTO() or CALENDAR(), but for now, the key takeaway is that you need one for MTD calculations to work reliably.

How to Create MTD Calculations in Power BI with DAX

Once you have your Date Table set up and properly related to your data, you're ready to create the actual MTD calculation. We'll explore two common DAX functions for this: TOTALMTD and a combination of CALCULATE with DATESMTD.

Step 1: Create a Base Measure

Before calculating MTD, you need a basic measure that simply sums the metric you want to track. For instance, if you're tracking sales, you need a "Total Sales" measure.

  1. In Power BI's Report view, right-click on your sales data table in the Data pane.

  2. Select New measure.

  3. In the formula bar that appears, enter the following DAX formula and press Enter:

(Replace Sales[SalesAmount] with your actual table and column name.)

This simple measure forms the building block for all our future time intelligence calculations.

Step 2: Calculate MTD using TOTALMTD

The TOTALMTD function is the most straightforward way to calculate a Month-to-Date value.

  1. Right-click on your sales data table again and select New measure.

  2. Enter this formula:

(Here, [Total Sales] refers to the base measure we just created, and 'Date'[Date] refers to the primary date column in your Date Table.)

That's it! You've just created a dynamic MTD measure. The beauty of this is that it works based on the context of your report. If you look at it on a dashboard filtered for January, it shows January's MTD. If you filter for February, it calculates February's MTD automatically.

Alternative Method: Using CALCULATE and DATESMTD

Another powerful way to achieve the same result is by using the CALCULATE function combined with DATESMTD. While it looks a bit more complex, understanding this pattern is key to mastering more advanced DAX.

  • DATESMTD: This is a "table function," meaning its output isn't a single value but a table containing a list of all dates from the beginning of the month to the latest date in the current context.

  • CALCULATE: This is arguably the most important function in DAX. It modifies the "filter context" of a calculation. In simple terms, you tell it what to calculate (e.g., [Total Sales]) and then you tell it how to filter the data first (e.g., only include dates from the DATESMTD function).

Here's the formula:

For this specific goal, both TOTALMTD and the CALCULATE version produce the exact same result. The CALCULATE method gives you more flexibility and control for more complex scenarios you may encounter down the line.

Visualizing Your MTD Performance

Now that you have your MTD Sales measure, you can use it to build insightful visuals.

1. The MTD KPI Card

The simplest way to display your MTD value is with a Card visual. This shows the up-to-the-minute MTD total in a large, easy-to-read format. Just drag your MTD Sales measure onto a Card visual on your report canvas.

2. The MTD Trend Line Chart

An MTD trend chart shows you the day-by-day progression of your metric throughout the month. This helps you visualize your momentum.

  • Add a Line chart visual to your report.

  • Drag the Day column from your Date Table to the X-axis.

  • Drag your MTD Sales measure to the Y-axis.

You'll see an upward-sloping line that reflects your cumulative sales day by day for the selected month.

3. Comparing Current MTD vs. Previous MTD

A common request is to compare this month's performance to the same point last month. To do this, we need one more measure: Previous Month-to-Date (PMTD) Sales.

We can create this using the DATEADD function, which shifts a set of dates by a specified interval.

  1. Create a New measure.

  2. Use the following DAX formula:

This formula takes our existing MTD calculation and tells it to shift the date context back by exactly one month.

  1. Now you can place both MTD Sales and PMTD Sales on a Clustered column chart or side-by-side KPI cards to see how you're tracking.

Analyzing MTD this way helps contextualize your current performance. Being at $15,000 in MTD sales on the 10th of the month is good, but knowing you were at $10,000 at this time last month is even better.

Final Thoughts

Creating MTD calculations is a fundamental skill for anyone using Power BI for business reporting. By setting up a proper date table and using simple but powerful DAX functions like TOTALMTD or CALCULATE with DATESMTD, you can build dynamic, real-time dashboards that keep your team focused and on track to hit your monthly goals.

And while mastering DAX is a valuable skill, we know it can feel like a steep learning curve when all you want are straightforward answers about your business. We built Graphed to remove this friction. Instead of writing formulas and configuring data models, you just connect your marketing and sales data sources and ask questions like, "Show me my MTD revenue from Shopify versus my Facebook Ads spend" in plain English. Graphed instantly builds you a live, interactive dashboard, letting you get straight to the insights in minutes, not hours.