Forum Discussion
Anonymous
3 years agoNot applicable
Make no date column from text column
Hi all, is there a way to create a Date column from a text column? The column that shows below is the text column i need to duplicate and create a date column from.
- Anonymous3 years ago
Hi Anonymous ,
Please try below steps:
1. below is my test table
Table:
2. create a new column with below dax formula
Date = VAR _a = [Periodo_ID] VAR _year = INT ( LEFT ( _a, 4 ) ) VAR _month = INT ( MID ( _a, 5, 6 ) ) RETURN FORMAT ( DATE ( _year, _month, 1 ), "YYYY/MM" )Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi Anonymous ,
Please try below steps:
1. below is my test table
Table:
2. create a new column with below dax formula
Date =
VAR _a = [Periodo_ID]
VAR _year =
INT ( LEFT ( _a, 4 ) )
VAR _month =
INT ( MID ( _a, 5, 6 ) )
RETURN
FORMAT ( DATE ( _year, _month, 1 ), "YYYY/MM" )
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.