How to create a MTD KPI in Power BI

Shashanka Shekhar
Microsoft Power BI
Published in
4 min readMar 9, 2024

--

Power BI is a platform that allows you to connect to various data sources, transform and model your data, and create interactive dashboards and reports. Power BI can help you gain insights from your data and communicate them effectively.

What are MTD calculations?

MTD, or Month-to-Date, refers to the period from the start of the current month up to, but not including, the current date. It’s used to provide information on a specific activity for this specific time period. In business and finance, MTD is often used to track changes in data over time. For example, a business might analyze its income, investment return for the month and business earnings.

Photo by Manasvita S on Unsplash

Building the KPI card for MTD Sales

We will be making this KPI card:

So calculating MTD Sales requires the need for a calendar table because there is a requirement of creating a calendar table whenever we are dealing with dates in Power BI.

1.DAX for calendar table creation:

Calender = CALENDAR(MIN(ecommerce_data[order_date]), MAX(ecommerce_data[order_date]))

where the arguments are the start and end dates in the main table which here is ecommerce_data and the MIN() and MAX() functions give us…

--

--

Shashanka Shekhar
Microsoft Power BI

Contributor for Microsoft Power BI. I like Data Analysis and Data Science. Also I enjoy sports, videogames and Japanese Anime in my free time.