Calculate Difference Between Two Dates using INT DAX Function

Welcome to Excel Jet Consult blog post. In this blog post, we want to learn how to calculate the difference between two dates using INT DAX Function. Let’s get started

INT DAX Function rounds a number to the nearest integer

Syntax                                  =INT(<number>)

In the caption below, we want to create a DAX Calculated Measure that will handle the difference between Order Date and Ship Date

In the Calculations group of the Modelling tab, click on New Column

In the formula bar, execute the DAX formula:

Date Diff = INT(Sales_Data[Ship Date]-Sales_Data[Order Date])

 

In the DAX formula above, the Sales_Data is the table name while Ship_Date and Order_Date in square brackets are individual columns in the table.

In the caption below, we can see that there is 7 days difference between the Ship_Date and Order_Date for transaction in row 1. In addition, we have the Date Diff calculated measure in the field list

Posted in Blog.

Leave a Reply

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