Forum Discussion
How to combine two columns dates into one column
Hi,
How to combine two dates columns of a table into one new column .please check below sample data for reference.
expecting output:
Sample excelreport:
| In_Date | Out_date |
| 01-11-2014 | 20-08-1999 |
| 15-04-1998 | 19-01-1998 |
| 16-11-2022 | |
| 20-08-1999 | 21-08-1999 |
| 21-01-2001 | 20-09-1993 |
| 21-09-1994 | 21-01-2001 |
| 30-01-1997 | 01-11-2014 |
Thanks,
Pioneer
Hi, Pioneer
This can only be done in Power Query.
Copy two more tables, delete one of the columns from each table, change the column names to [In and Out date] and use Append.
Select Remove duplicates.
Join the initial table and the Append table to the right.
Result:
Click in the top right corner to expand.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
10 Replies
- AnonymousNot applicable
- PioneerRegular Visitor
Hi Anonymous,
Iam looking for the Dax logic to achieve the expected output column in the same table.
Thanks,
Pioneer
- AnonymousNot applicable
Yes, but its needed to know the logic how you want obtain the output column,
is In_date at top and Out_date at bottom and remove duplicates?
- v-zhangti
Community Support
Hi, Pioneer
You can try the following methods.
New Table:Table 2 = DISTINCT(UNION(VALUES('Table'[In_Date]),VALUES('Table'[Out_date])))Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-zhangti
Community Support
Hi, Pioneer
This can only be done in Power Query.
Copy two more tables, delete one of the columns from each table, change the column names to [In and Out date] and use Append.
Select Remove duplicates.
Join the initial table and the Append table to the right.
Result:
Click in the top right corner to expand.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.