What is the process to find the maximum date in Power BI, and can you provide an example?

The process to find the maximum date in Power BI involves using the MAX function in the DAX (Data Analysis Expressions) language. This function allows users to find the highest value in a given column or set of values. To find the maximum date, the user needs to select the column containing the dates and use the MAX function in a new calculated column. The result will be the maximum date in the selected column. For example, if we have a column named “Order Date” with dates ranging from January 1, 2021 to December 31, 2021, using the MAX function will return December 31, 2021 as the maximum date.

Find Max Date in Power BI (With Example)


You can use the following syntax in DAX to calculate the max date (i.e. most recent date) in a column in Power BI:

Max Date = FORMAT(MAX('my_data'[Date]), "M/D/YYYY")

This particular example creates a new measure named Max Date that calculates the most recent date in the Date column of the table named my_data.

The following example shows how to calculate the max of values in a column in Power BI in practice.

Example: How to Calculate Max Date in Power BI

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

Suppose we would like to calculate the most recent date in the Date column.

To do so, click the Table tools tab along the top ribbon, then click the New measure icon:

Then type in the following formula into the formula bar:

Max Date = FORMAT(MAX('my_data'[Date]), "M/D/YYYY")

This will create a new measure named Max Date that contains the most recent date in the Sales column of the table:

Power BI calculate max date

If we’d like, we can display this value by going to the Report View in Power BI, then by clicking the Card icon under the Visualizations tab, then by dragging the Max Date measure under the Fields label:

This will produce the following card that displays the max date in the Date column of the table:

We can see that the max date (i.e. most recent date) in the Date column is 5/16/2023.

Note that we used the FORMAT function to specify that we’d like to display the max date using a M/D/YYYY format.

This can be useful to prevent Power BI from displaying the time of 12:00:00 AM after the date as well.

Additional Resources

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

x