How to Add Days to Date in Power BI (With Example)


You can use the following formula in DAX to add a specific number of days to an existing date:

Date Plus Seven = 'my_data'[Date] + 7 

This particular formula creates a new column named Date Plus Seven that adds seven days to the existing dates in the Date column of the table.

Note: This formula assumes that the existing column named Date has a Data type of Date.

The following example shows how to use this formula in practice.

Example: How to Add Days to Date in Power BI

Suppose we have the following table named my_data in Power BI that contains information about sales made on various dates by some company:

Suppose that we would like to create a new column that adds seven days to each date in the Date column.

Before we do so, we should first click on the Date column header to ensure that the data type is date:

We can see that the Date column does indeed have a data type of date.

Next, click the Table tools tab, then click the icon called New column:

Then type the following formula into the formula bar:

Date Plus Seven = 'my_data'[Date] + 7

This will create a new column named Date Plus Seven that adds seven days to each date in the existing Date column:

Power BI add days to date

Note that you could also subtract a specific number of days by using the following syntax:

Date Minus Seven = 'my_data'[Date] - 7

This will create a new column named Date Minus Seven that subtracts seven days to each date in the existing Date column:

Power BI subtract days from date

Feel free to replace the 7 in the formula to add or subtract however many days you would like from an existing date column.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

Power BI: How to Filter Between Two Dates
Power BI: How to Extract Date from Datetime
Power BI: How to Find Max Date

Leave a Reply

Your email address will not be published. Required fields are marked *