# The DATEADD Function: The Best And Most Versatile Time Intelligence Function in Power BI

If you need a Power BI time intelligence function that you can use to generate time comparisons over a range of different time frames, then the DATEADD function is the one you’re looking for. You may watch the full video of this tutorial at the bottom of this blog.

This, by far, is my go-to time intelligence function in DAX at the moment. After going through this post and the video below, it surely will be your favorite too.

This detailed blog will go through all the various aspects of how to set up time comparison analysis with this function.

You can download the Power BI (pbix) file below and follow along throughout the video. Just let us know where to send the file.

## Using the DATEADD Function in Power BI

In this blog, we will use the total sales measure as an example in showing how the DATEADD function can be utilized.

You’ll see how you can compare the sales this year with the sales last year.

But since using DATEADD allows you to compare a measure to any time period, you can look at other time periods such as day, month, or quarter.

Just by making a few tweaks in the formula, like changing the number of months or replacing month with quarter, you can easily have the data you’re looking for.

I think you’ll be amazed at how easy it is to actually do this type of analysis using DAX in Power BI.

## Other uses of the DATEADD Function

The usefulness of the DATEADD function does not end with comparing total sales at different time periods. You can actually use it for any metric that you want to look into. For instance, it can be used when calculating the following:

1. Percentage change
2. Difference between time periods
3. Cumulative sales

So, try this out and see how the DATEADD function can be useful to you.

Time Intelligence For Non Standard Date Tables In Power BI
Calculate Financial Year To Date (FYTD) Sales In Power BI using DAX
Discover How To Repeatedly Project A Current Trend Forward In Power BI

## Conclusion

In this post, you’ve seen why the DATEADD is simply the best and most versatile time intelligence function in Power BI.

Not only can you use it to compare a metric to any time period but changing time periods is also really easy. DATEADD can also be used in many other types of calculation.

I’m hoping that from grabbing the download and watching through the video below you’ve now got a much better understanding of how great the DATEADD function is.

Some recommended links for you so you can dive into time intelligence techniques inside of Power BI:

Previous Weeks Sales – Advanced Time Intelligence w/ DAX in Power BI
Create Dynamic Forward Forecasts in Power BI with DAX

Sam

## Pros & Cons of Quick Measures In Power BI

Today, I want to do an overview of quick measures and show you how they have evolved over time. I'll...

## How To Format Data In Report Builder

In this tutorial, you’ll learn how to format data in your paginated reports in Report Builder. Report...

## Create A Delimited List In Power Query – Query Editor Tutorial

I'm going to show you how to create a delimited list using the Power Query. I came across this question...

## Want A Data Driven Culture? Why Power BI Should Be Your Tool Of Choice

For years I've heard and listened to all the marketing buzz around how businesses could develop data...

## Tabular Form In Power BI

Today, you will learn how to calculate the ranking in a tabular form when fields from different...

## Card Visual In Power BI: Fixing Incorrect Results

In this tutorial, you’ll learn about fixing card visual results in Power BI. Cards are native visuals...

## Top Customer Per Product – Power BI Analysis

This tutorial involves finding out your top customer per product using an advanced Power BI analysis....

## Showcasing And Understanding Anomalies In Power BI

Many times with the analytical work that you are completing, you may want to showcase anomalies. You...

## Power BI Challenge 13 – Acing Your Documentation

We’ve just finished a difficult yet fulfilling 12th round for the Power BI Challenge, which was based...

## Page Navigation In Power BI With Icons

Today, I would like to show you how to use page navigation in Power BI using icons in a creative way to...

## Master Virtual Tables in Power BI Using DAX

In this blog post, I'll run through a truly powerful analytical technique which I'm confident will WOW...

## Power BI Tooltips On Report Images

With the recent Power BI challenges that we run in Enterprise DNA, I've become a huge fan of the Power...