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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Jeanxyz
Impactful Individual
Impactful Individual

convert date to text

I want to create a key column Source_Target_Date in the format of  USD_USD_10/18/2022. Below is what I get, how can I avoid the "-" symbol in the column?

 

date format.png

1 ACCEPTED SOLUTION
Jeanxyz
Impactful Individual
Impactful Individual

I tried the DAX below and get AUD_AUD_10-18-2022.  

Column = 'Table'[Converted currency]&"_"&'Table'[budget currency]&"_"&FORMAT('Table'[dateid],"MM/DD/YYYY")

 Below is how I solve the problem. However, it's a bit complicated, so I was hoping there is an easier solution. 

Source_Target_Date = [Converted Currency]&"_"&[Budget Currency] &"_"&format(month([DateID]),"0#") &"/"&format(day([DateID]),"0#") &"/"&year([DateID])
 
 

View solution in original post

4 REPLIES 4
mangaus1111
Solution Sage
Solution Sage

Hi @Jeanxyz ,

 

for me it works easily. I think that is important that you don´t change the data type in Power Query from date to text.

 

mangaus1111_0-1666296237058.png

 

Arul
Super User
Super User

@Jeanxyz ,

This may help you,

Source_Target_Date = [Converted Currency]&"_"&[Budget Currency]&"_"&FORMAT([DateID],"DDMMYYYY")

Thanks, 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Samarth_18
Community Champion
Community Champion

Hi @Jeanxyz ,

 

You can try like this:-

Column = 'Table'[Converted currency]&"_"&'Table'[budget currency]&"_"&FORMAT('Table'[dateid],"MM/DD/YYYY")

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Jeanxyz
Impactful Individual
Impactful Individual

I tried the DAX below and get AUD_AUD_10-18-2022.  

Column = 'Table'[Converted currency]&"_"&'Table'[budget currency]&"_"&FORMAT('Table'[dateid],"MM/DD/YYYY")

 Below is how I solve the problem. However, it's a bit complicated, so I was hoping there is an easier solution. 

Source_Target_Date = [Converted Currency]&"_"&[Budget Currency] &"_"&format(month([DateID]),"0#") &"/"&format(day([DateID]),"0#") &"/"&year([DateID])
 
 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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