Forum Discussion
Concatenate dates
- Feb 12, 2020
In DAX
you may use
=CONCATENATE(Table1[Name],CONCATENATE("-",CONCATENATE(Table1[Record Number],CONCATENATE("-",Table1[Expiration Date]))))
but much better is
=Table1[Name] & "-" & Table1[Record Number] & "-" & Table1[Expiration Date]
The best way to achieve your desired outcome is as follows
1. Click anywhere in your data and press CTRL + T. Ensure my data has headers is checked.
2. Click OK
3. In the Data tab, click on From Table/Range
4. In the Power Query editor, select all the three columns
5. Click on Merge Columns in the Add Column tab
6. In the Merger Column dialogue box, select Custom as Separator
7. In the box below, type in - (as your separator)
8. Click OK
In the caption below, you have the newly added column
9. Right-click on the first 3 columns and select Remove columns
10. Finally, select Close and Load in the Home tab to load the result back to Excel
That is the final answer.
TEXTJOIN method
=TEXTJOIN("-",TRUE,D5,E5,TEXT(F5,"mm/dd/yyyy"))
See attached
If this solve your question, kindly do accept as the Best Response.
Regards