Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Razorbx13
Post Patron
Post Patron

Date Issues when Creating a Join

Is there a way to NOT HAVE the date change when I concantenate two fields?  I am creating a key of employee number and a date.  The date looks fine below on the right hand side, but when I create the KEY field, the date changes to YYYY-MM-DD.  It needs to stay as MM/DD/YYYY so it can used as a join to another table.  This is a direct query table to be joined to another direct query table.

TIA!

Date.png

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Razorbx13 

 

Based on your description, I created data to reproduce your scenario.

c1.png

 

 

Then you may create a calculated columns as follows.

 

NewColumn = 
'Table'[ID]&"-"&FORMAT('Table'[Date],"yyyy-MM-dd")

 

 

Result:

c5.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Razorbx13 

 

Based on your description, I created data to reproduce your scenario.

c1.png

 

 

Then you may create a calculated columns as follows.

 

NewColumn = 
'Table'[ID]&"-"&FORMAT('Table'[Date],"yyyy-MM-dd")

 

 

Result:

c5.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VasTg
Memorable Member
Memorable Member

@Razorbx13 

 

Create a new Custom Column in Query editor with this formula.

 

=Text.From([Column1]) & Text.From([Column2])

image.png

 

If this helps, mark it as a solution

Kudos are nice too

 

Connect on LinkedIn

Close, but my date still comes out as YYYY-MM-DD.  See below.  Trying to get XXXX-MM/DD/YYYY

 

Date.png

@Razorbx13 

 

Is your 1st Date column is in MM/DD/YYYY date format? What's your source?

 

Can't you just convert the MM/DD/YYYY to YYYYMMDD numeric format and concatenate?

=Date.ToText([Date1],"YYYYMMDD") & Text.From([Emp])

 

If this helps mark it as a solution

Kudos are nice too 

Connect on LinkedIn

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors