Power BI 3 min

Power BI: Add a dynamic month column

Short answer

In Power BI it is often useful to filter data on the current month, for example to keep monthly reports or analyses up to date. In this article you'll learn how to add a dynamic month column in Power BI that automatically marks the current month.

In Power BI it is often useful to filter data on the current month, for example to keep monthly reports or analyses up to date. In this article you'll learn how to add a dynamic month column in Power BI that automatically marks the current month.

In Power BI it is often useful to filter data on the current month, for example to keep monthly reports or analyses up to date. In this article you’ll learn how to add a dynamic month column in Power BI that automatically marks the current month. This makes it easier to build dashboards and reports that are always up to date without manual adjustments.

What you need

  • A date table in your Power BI model with a column containing full dates

  • Basic knowledge of DAX formulas in Power BI

Step 1: Check whether you have a date table

A date table is essential for time-based analyses in Power BI. Check whether your model contains a date table with a column in which every day of the year is listed. This table is used to create the dynamic month column.

If you do not yet have a date table, you can easily create one with the DAX function CALENDAR or CALENDARAUTO(). Add it via ‘Modeling’ > ‘New Table’ and use for example:

DateTable = CALENDARAUTO()

Step 2: Create a dynamic column for the current month

Add a new calculated column to your date table that indicates whether the date falls in the current month. Do this with the following DAX formula:

IsCurrentMonth = 
IF(
    YEAR(DateTable[Date]) = YEAR(TODAY()) && 
    MONTH(DateTable[Date]) = MONTH(TODAY()),
    "Yes",
    "No"
)

This column indicates for each date whether it falls within the current month with “Yes” or “No”. This makes it possible to easily filter on current data.

Step 3: Use the dynamic month column in your report

Use the new IsCurrentMonth column as a slicer or filter in your reports and dashboards. This allows you to quickly and automatically show the data for the current month without having to manually adjust filters.

This is especially useful for monthly reports, KPI overviews, and dashboards that must always be up to date.

Tips & common mistakes

  • Date table as date source: Always use a date table and not date columns directly from your fact tables, to guarantee consistent time filters.

  • Avoid static dates: Do not use fixed dates in your DAX, but always use dynamic functions like TODAY() for current analyses.

  • Check time zone: The TODAY() function works based on the system date of the Power BI environment; keep this in mind for international reports.

Example: dynamic month filter in a sales dashboard

Suppose you have a sales dashboard where you want to show revenue for the current month. With the IsCurrentMonth column you can add a slicer so users automatically see the data for the current month. This prevents you from having to manually adjust filters every month and ensures an up-to-date overview.

Now you know how to add and use a dynamic month column in Power BI. You can apply these steps directly in the online environment or Power BI Desktop.

Our tip: Document every Power Query step with a clear name. This way a colleague (or yourself six months from now) immediately understands what is happening without having to read the formula.

Frequently asked questions

What tips and common mistakes are there?

- Date table as date source: Always use a date table and not date columns directly from your fact tables, to guarantee consistent time filters. - Avoid static dates: do not use fixed dates in your DAX, but always use dynamic functions like TODAY() for current analyses. - Check time zone: the TODAY() function works based on the system date of the Power BI environment or local computer, which can cause discrepancies in international reports. - Rename the column: give the IsCurrentMonth column a clear name so colleagues immediately understand what the column does without having to read the formula.

How do I create a dynamic month column in Power BI with DAX?

Add a calculated column to your date table with the DAX function IF combined with YEAR and MONTH. The formula compares the year and month of each date with the current date via TODAY(). If both match, the row gets the value 'Yes', otherwise 'No'. Then use this column as a slicer or page filter in your report so that the current month is always automatically selected.

Can I also use the dynamic month column as a default slicer setting?

Yes, add the column as a slicer to your report and set the default value to 'Yes'. This causes the report to always open filtered on the current month, without users having to manually select a month. You can also hide the slicer if you want the filter to always be active in the background, via the page filter in the filter pane.

Want a dashboard or automation built for you?

Stuurboard BI builds custom Power BI dashboards and workflow automations. Pragmatic, fast, and without the fuss.