How to 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:

How to Count Number of Occurrences in Power BI
How to Calculate Standard Deviation in Power BI
How to Calculate a Cumulative Sum in Power BI

Leave a Reply

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