Forum Discussion
Ocasio27
Feb 10, 2020Iron Contributor
Concatenate dates
Hello everyone. When I try to concatenate 3 columns, one of them has dates, I get in the results column a number that equales a date. Very annoying. My column formula =CONCAT([@[Name]],"-",...
- 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]
Riny_van_Eekelen
Feb 10, 2020Platinum Contributor
Alternatively, try this:
=CONCAT([@Name],"-",[@Record_number],"-",TEXT([@Expiration_Date],"dd/mm/yyyy"))
- Ocasio27Feb 10, 2020Iron Contributor
=CONCAT([@Name],"-",[@Record_number],"-",TEXT([@Expiration_Date],"dd/mm/yyyy"))
=CONCAT([@[Name]],"-",[@Record_number],"-",TEXT([@[Expiration_Date]],"dd/mm/yyyy"))
Made a slight modification. For some reason I MUST keep the first and last columns with [@[]] or else i get a mess, IDK why
- Riny_van_EekelenFeb 10, 2020Platinum Contributor
What's "IDK"?
I replicated your example as shown in the picture below. Don't understand why you must have the extra
"[@[]]". But if it works for you, that's okay, I guess.
- Ocasio27Feb 10, 2020Iron Contributor
I mean I dont knowMy formula bar will automatically add those []. Even if i try to change the whole formula by adding the table as reference it turns it back to those extra []. In the end, it works anyway so OK