We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
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.
Solved! Go to Solution.
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.
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.
Hi @Anonymous ,
You can use this type of powerquery :-
= Table.TransformColumnTypes(Table.AddColumn(#"Changed Type", "Custom", each Date.FromText([data])),{{"Custom", type date}})
Or else you can simply select the column then Change type -> Using locale
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Proud to be a Super User!
User | Count |
---|---|
67 | |
61 | |
47 | |
35 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |