# Power BI DAX Min Date

In this Microsoft Power BI tutorial, I have explained how to filter the minimum date value using the Power BI DAX Min Expression, and also we will see how to display the minimum sum value by using the Dax Min function in Power Bi. I will also show you different examples to filter the Minimum Date value in Power BI.

I started to work on the Power Bi report, where I got a requirement to filter the minimum date value of table data values using the Power BI Min function. Also will cover below headings:

1. Power BI DAX min date
2. Power BI DAX min date between two dates
3. Power BI DAX min date dd/mm/yyyy
4. Power BI DAX min date in the current month
5. Power BI DAX min DateTime
6. Power BI DAX min date greater than
7. Power BI DAX min date less than
8. Power BI DAX min date less than today
9. Power BI DAX min date sum
10. Power BI DAX min date by group
11. Power BI DAX min date and max date
12. Power BI DAX min date lookup
13. Power BI DAX min date from week number
14. Power BI DAX min date remove

## Power BI DAX min date

Let us see how we can calculate the minimum date using the Power Bi min function in Power Bi

In this example, we will calculate the minimum date for the release date column in the car table and display the oldest car price value in the card visual.

• Open the Power Bi desktop, and load the data into the desktop. Select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula.
``````Oldest Car Price =
var Mindate =MIN (Cars[Released Date])                                                                                                              var oldestcar = CALCULATE(SUM(Cars[Cost Price]),Cars[Released Date] =  Mindate)
return oldestcar``````

Where,

1. Oldest Car Price = New Measure name
2. Cars = Table Name
3. Released Date = Existing column name
4. Min date, oldest car = Variable name
• Now in the report section, select the table visual and card visual. In the table visually drag and drop the car name, car price, and released date value from the field pane.
• And in the card visual drag and drop the Created measure value to display the minimum price value based on the condition applied.
• The screenshot below displays the car price value in the card visual for the minimum car based on the released date column.

This is how to calculate the minimum date using the Power Bi min function in Power Bi.

## Power BI DAX min date between two dates

Let us see how we can find the minimum dates between two date columns using the Power Bi Dax Min function in Power Bi.

Here we will calculate the minimum value between two dates using the DAX min function in Power Bi.

• Initially, Open the PowerBi desktop and load the data into the desktop.
• Once the data has been loaded click on the Modelling tab -> new column option then apply the below-mentioned formula.
``Between two dates = IF([Released Date]=BLANK(),[Planned Sale Date],IF([Planned Sale Date]=BLANK(),[Released Date],MIN([Released Date],[Planned Sale Date])))``

Where,

1. Between two dates = New Column name
2. Released Date and Planned Date = Existing column names
3. Blank & Min = Function names

In the below screenshot, you can see that the new column has been added and displayed the minimum value by comparing two different date columns presented in the car’s data table.

This is how to find the minimum dates between two date columns using the Dax expression in Power Bi.

## Power BI DAX Min date dd/mm/yyyy

Here we will see how to format or change the date format to dd/mm/yy using the Power Bi Dax expression in Power Bi.

In this example, we will see how to change the default date format to the dd/mm/yy format. By default, the date type will be displayed in Day, Month, Date, and Year format. But here we will see how to display the date as dd//mm/yy format.

• Open the Power bi desktop, Load the data using the get data option, and click on the Modelling tab -> new column option. Then apply the below-mentioned DAX expression:
``Min Format Date = FORMAT(Cars[Released Date],"DD/MM/YY")``

Where,

• Format Date = New Column name
• Cars = Table Name
• Released Date = Existing column name
• DD/MM/YY = Date Format

The Existing Released date column is in the format of day/mm/dd/yyyy, where the newly added column formatted date value as dd/mm/yy as shown below:

This is how to format or change the date format to dd/mm/yy format using the Power Bi Dax expression in Power Bi.

## Power BI DAX min date in the current month

Here we will find the minimum date value for the current month using the Power Bi Min and if date function in Power Bi.

In this example, we will first calculate the values that are matching with the current month, and later we will find the minimum date value for the current month presented in the car data table.

• Open the PowerBi desktop and load the data into the desktop.
• Once the data has been loaded click on the Modelling tab -> new column option then apply the below-mentioned formula.
``Current Month = NOW()``

Where,

• Current Month = Column Name
• Now = Function Name

In the below screenshot, you can see that it displays the current Month’s Value along with the date and time.

• In the same way, we will find the values that are matching with the current month ( ie, Today’s date is – (02/01/2023, Current Month is January).
• If the release date column month value matches with the current month column month value then it will display true else false.
• Now apply the below-mentioned formula in the new column formula bar.
``Matching with CurrentMonth = IF([Released Date].[MonthNo]=Cars[Current Month].[MonthNo],TRUE(),FALSE())``

Where,

• Matching with CurrentMonth = New Column Name
• Released Date, Current Month = Existing Column Names
• Cars = Table Name

In the below screenshot, you can see that it displays the matching month values as true and the remaining values as false.

• In the same way, create another new column and apply the below-mentioned formula to find the minimum date value for the current month.
``IsItInCurrentMonth = IF([Released Date].[MonthNo]=Cars[Current Month].[MonthNo],MIN(Cars[Current Month],Cars[Released Date]))``

Where,

• IsItInCurrentMonth = New Column name
• Released Date, Current Month = Existing Column names
• MIN = function name
• Cars = Table Name
• The Screenshot below shows that it compares and displays the minimum date value in the new column: Example of Power BI DAX min date in the current month

This is how to find the minimum date value for the current month using the Power Bi Min function in Power Bi.

## Power BI DAX min DateTime

Let us see how to display the minimum date value along with the time using the Power BI Dax Min function in Power BI

In this example, we will find the min Date value and display the result along with the Time using the Power Bi Min function in Power Bi.

• Open the Power Bi desktop, and load the data into the desktop. Select the new measure option and apply the below-mentioned formula.
``MinimumDateValue = MIN(Cars[Released Date])``

Where,

1. MinimumDateValue  = New measure name
2. Cars = Table Name
3. Released Date = Existing column name
• Now in the report section, select the table visual and card visual. In the table visually drag and drop the car name, car model, and released date value from the field pane.
• And in the card visual drag and drop the Created measure value to display the minimum date value based on the condition applied.
• The screenshot below displays the minimum date value in the card visual for the release date column.

This is how to find the minimum date value from the data table and display the result value along with the time using the Power Bi Dax Min function in Power BI.

Check out: Power BI Dax Max Function

## Power BI DAX min date greater than

Here we will see how we can find the greater date value between the two date columns using the Power Bi Min function in Power Bi.

In this example, we will compare the car released date column and today’s date column, it will compare the two date columns and display the greatest value in the new column.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option and apply the below-mentioned formula.
``Earliest Response = CALCULATE(MINX('Cars',[Released Date]), FILTER('Cars', Cars[Released Date] > 'Cars'[Today]))``

Where,

1. Earliest Response  = New column name
2. Cars = Table Name
3. Released Date, Today= Existing column names
4. MINX = Function Name

In the below screenshot, you can see that it compares and displays the greater date value in the new column:

This is how to find the greater date value between the two date columns using the Power Bi Min function in Power Bi.

## Power BI DAX min date less than

Let us see how we can find the minimum date value between the two date columns using the Power Bi Min function in Power Bi.

Here we will compare the two date columns and display the minimum date value which is lesser than the other date column presented in the data table in Power Bi.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option and apply the below-mentioned formula.
``Less than = CALCULATE(MINX('Cars',[Released Date]), FILTER('Cars', Cars[Released Date] < 'Cars'[Today]))``

Where,

1. Less than  = New column name
2. Cars = Table Name
3. Released Date, Today= Existing column name
4. MINX = Function Name

In the below screenshot, you can see that it compares and displays the minimum date value based on the lesser than condition applied in the new column:

This is how to find the minimum date value between the two date columns using the Power Bi Min function in Power Bi.

## Power BI DAX min date less than today

Here we will see how we can find the minimum date less than today’s date value using the Power Bi Dax expression in Power BI.

In this example, we will see if the Planned Sales date column is less than today’s date value then it displays the true value else false.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option and apply the below-mentioned formula.
``Less than today = if(Cars[Planned Sale Date] < Cars[Today],TRUE(),FALSE())``

Where,

1. Less than today  = New column name
2. Cars = Table Name
3. Planned Sale Date, Today= Existing column names

In the below screenshot, you can see that it compares and displays the value which is lesser than today’s date value as true and remaining as false based on the condition applied in the newly added column.

This is how to find the minimum date value less than today’s date value using the Power Bi DAX min Expression in Power BI.

## Power BI DAX min date by group

Let us see how to find the minimum date by grouping the values using the Power Bi Min function in Power Bi.

In this example, we will find the minimum date by grouping the repeated car name values, based on the minimum date value displays the result as 1 else 0.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option and apply the below-mentioned formula.
``````Grouping =
var _min = minx(filter(Cars,[Released Date] = MIN(Cars[Released Date])),[Released Date])
return
if([Released Date] = _min, 1,0)
``````

Where,

1. Grouping  = New column name
2. Cars = Table Name
3. Released Date, Today= Existing column name
4. MINX = Function Name
5. _min = Variable Name

The Screenshot below shows that it compares two date values by grouping the car names and the minimum date value displays the result as 1 else 0.

This is how to find the minimum date by grouping the values using the Power Bi Min function in Power Bi.

## Power BI DAX min date and max date

Let us see how we can find only min and max dates and blank the remaining row values blank using the Power Bi Min and Max expressions in Power Bi.

In this example, we will find the min and max values for the car released date column and display the result in the newly created column.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option and apply the below-mentioned formula.
``````Min and Max date =
IF (Cars[Released Date] = MAX ( Cars[Released Date] ), "MAX",
IF ( Cars[Released Date]= MIN ( Cars[Released Date] ), "MIN", BLANK () )
)``````

Where,

1. Min and Max date  = New column name
2. Cars = Table Name
3. Released Date= Existing column name

In the below screenshot, you can see that the displays result only for the minimum date and the maximum date and for the remaining rows it displays the blank value.

This is how to find only min and max dates and blank the remaining row values blank using the Power Bi Min and Max expressions in Power Bi.

## Power BI DAX min date lookup

Let us see how we can find the Power Bi Dax Min date value using the power bi Dax LookUp function in Power BI.

In this example, we use the Power BI Dax lookup function and calculate the minimum date value and display the result value in a new column in the car’s table.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option from the ribbon under the Home tab and apply the below-mentioned formula.
``````MinDATE =
VAR MinDate =
LOOKUPVALUE (Cars[Planned Sale Date],Cars[Car Names],MIN(Cars[Planned Sale Date]))
RETURN
MIN(Cars[Planned Sale Date])``````

Where,

1. MinDATE  = New column name
2. MinDate = Variable name
3. Cars = Table Name
4. Planned Sale Date, Car Names = Existing column names

In the below screenshot, we can see that the new column displays the minimum date value in the table based on the applied condition.

This is how to find the Power Bi Dax Min date value using the power bi Dax LookUp function in Power BI.

## Power BI DAX min date from week number

Let us see how we can find the minimum date based on the week number using the Power Bi Dax expression in Power Bi.

In this example, first, we will find the week number value based on the week number we will calculate the minimum date value for the planned sale date column.

• Open the Power Bi desktop, and load the data into the desktop. Select the new column option from the ribbon under the Home tab and apply the below-mentioned formula.
``WeekNum = WEEKNUM(Cars[Planned Sale Date],1)``

Where,

1. WeekNum  = New column name
2. Cars = Table Name
3. Planned Sale Date = Existing column names

In the below screenshot, we can see that the week number has been displayed based on the planned sale date column:

• In the same way, we will create a new column and display the minimum date based on the week number and display the minimum date in the new column.
• In the column formula bar apply the below-mentioned formula:
``MinWeekNum = MIN(Cars[WeekNum])``

Where,

1. MinWeekNum= New column name
2. Cars = Table Name
3. WeekNum = Existing column name

In the below screenshot, we can see that the new column displays the Minimum week number:

• Now again create a new column and apply the below formula to display the Minimum date.
``Mindate = MIN(Cars[Planned Sale Date])``

Where,

1. Min date = New column name
2. Cars = Table Name
3. Planned Sale Date = Existing column name

In the below screenshot, we can see that the week number has been displayed based on the planned sale date column:

This is how to find the minimum date based on the week number using the Power Bi Dax expression in Power Bi.

## Power BI DAX Min date remove

Let us see how to find or exclude the minimum date value using the Power Bi Dax Min function in Power Bi.

In this example, we will use the slicer visual and table visual, if the selected value is the minimum date value then it displays the true value else false.

• Load the data into the Power bi desktop using the get data option, Select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula.
``ExcludeMeasure = IF(SELECTEDVALUE(Cars[Released Date])=MIN(Cars[Released Date]),TRUE(),FALSE())``

Where,

1. ExcludeMeasure = New Measure name
2. Cars = Table Name
3. Released Date = Existing column name
• Now in the report section, select the Slicer visual and Table visual. In the slicer visually drag and drop the released date field from the field pane.
• And in the table visually drag and drop the Car Name, Car Model, Releases date and the Created measure value to display the result value based on the condition applied.
• The screenshot below displays the selected value as the minimum date value then it displays the true value.

This is how to find or exclude the minimum date value using the Power Bi Dax Min function in Power Bi.

This Power BI tutorial explained how to easily calculate the Minimum date value from the table data using the Power Bi Dax Min function. Also, we covered these topics below:

• Power BI DAX min date
• Power BI DAX min date between two dates
• Power BI DAX min date dd/mm/yyyy
• Power BI DAX min date in the current month
• Power BI DAX min DateTime
• Power BI DAX min date greater than
• Power BI DAX min date less than
• Power BI DAX min date less than today
• Power BI DAX min date by group
• Power BI DAX min date and max date
• Power BI DAX min date lookup
• Power BI DAX min date from week number
• Power BI DAX Min date remove

You may like the following Power BI tutorials: