Power BI DAX Min Date from Text

In the Power Bi tutorial, we will learn how to convert a column from Text data type to Date data type in Power Bi.

Then I will show you, how to get the min value of the date data type column using the Power BI Min function.

In a recent Power Bi project, I had to calculate the minimum date value of a date column for the data table using the Power BI Min aggregation function.

Here we will use the below-mentioned Car data table scenario consisting of five different columns like Car Names, Car Models, Price, Released Date, and Color.

Power bi converts text to date
Power bi converts text to date

Where,

  • Car Names, Car Model, Released Date, and Color = Text data type
  • Price = WholeNumber

Now in the following heading, we will see how to convert the Text data type to the date data type for the released column.

Power bi converts text to date

Let us see how we can find the minimum date value by converting the text data type to the date data type in Power Bi,

  • Open the Power bi desktop, and load the table data using the get data option.
  • Once the data has been loaded, check the data type of the date column, To check: Select the date column -> Column Tools -> Date Type as highlighted below:
Power bi convert text to date
Power bi converts text to date
  • Now, Click on the New Column under the table tools option and apply the below-mentioned formula in the New column formula bar to convert the column value from the text data type to the date data type.
Text to Date = DATEVALUE(Cars[Released Date])

Where,

  • Text to Date = New Column Name
  • DATEVALUE = Function Name that Converts text type to date/time type
  • Cars = Table Name
  • Released Date = Existing Column Name
See also  Power BI Row level security vs Object level security

In the below screenshot, we can see that the new column displays the value as date/time type.

Power bi converts text to date example
Power bi converts text to date example
  • We can also format the date 12/17/2022 from 12:00:00 to 12/17/2022 by expanding the Format option under the column tools as below:
Example of Power bi convert text to date
Example of Power bi convert text to date

This is how to find the minimum date value by converting the text data type to the date data type in Power Bi.

Read Power BI DAX Min Date Sum

Power bi converts text to date dd/mm/yyyy

Here we will how to convert the text to date data type and format the date as dd/mm/yyyy using the Power Bi Format function in Power Bi.

In this example, we will convert the date to the specific or mentioned date format dd/mm/yyyy

  • Open the Power bi desktop, and load the table data using the get data option. In the cars table as we already released date column is of type text.
  • Now we will create the New Column under the table tools option and apply the below-mentioned formula in the New column formula bar to convert the column value from the text data type to the date data type.
Date Format = DATEVALUE(FORMAT(Cars[Released Date],"DD/MM/YYYY"))

Where,

  • Date Format = New Column Name
  • DATEVALUE = Function Name that Converts text type to date/time type
  • Format = Function Name
  • Cars = Table Name
  • Released Date = Existing Column Name

In the below screenshot, we can see that the new column displays the value as date/time type and also with the mentioned format.

Power bi converts text to date ddmmyyyy
Power bi converts text to date dd/mm/yyyy

This is how to convert the text-to-date data type and format the date as dd/mm/yyyy using the Power Bi Format function in Power Bi.

See also  What if Parameter in Power BI

Read Power BI DAX Min Date Minus

Power bi converts text to date mm/yyyy

Let us see how to format the date as dd/mm/yyyy using the Power Bi Format function in Power Bi.

In this example, we will convert the date to the specific or mentioned date format mm/yyyy

  • Open the Power bi desktop, and load the table data using the get data option.
  • Now we will create the New Column under the table tools option and apply the below-mentioned formula in the New column formula bar to display the date value as mm/yyyy format.
Formatted Date = FORMAT(Cars[Text to date],"mm/yyyy")

Where,

  • Formatted Date = New Column Name
  • Format = Function Name
  • Cars = Table Name
  • Text to date = Existing date Column Name

In the below screenshot, we can see that the new column displays the extracted month and year value from the existing date column with the mentioned format.

Power bi converts text to date mmyyyy
Power bi converts text to date mm/yyyy

This is how to format the date as mm/yyyy using the Power Bi Format function in Power Bi.

Power bi converts text to date yyyy/mm/dd

Let us see how to format the date as yyyy/mm/dd using the Power Bi Format function in Power Bi.

In this example, we will convert the date to the specific or mentioned date format yyyy/mm/dd

  • Open the Power bi desktop, and load the table data using the get data option.
  • Now we will create the New Column under the table tools option and apply the below-mentioned formula in the New column formula bar to display the date value as yyyy/mm/dd format.
Formatted Date = FORMAT(Cars[Text to date],"yyyy/mm/dd")

Where,

  • Formatted Date = New Column Name
  • Format = Function Name
  • Cars = Table Name
  • Text to date = Existing date Column Name
See also  Power BI Measure If Multiple Conditions

In the below screenshot, we can see that the new column displays the extracted year, month, and date value from the existing date column with the mentioned format.

Power bi converts text to date yyyymmdd
Power bi converts text to date yyyy/mm/dd

This is how to format the date as yyyy/mm/dd using the Power Bi Format function in Power Bi.

Read Power BI DAX Min Date Validation

This Power Bi Tutorial helps you to convert the date column from the Text data type to the Date data type and also to filter the minimum date value using the Power Bi Min function in Power Bi.

You may like the following Power BI tutorials:

>