cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dpbi
Helper I
Helper I

Format Date and Time

I have Excel file with date column ('Column1') format as:  dd/mm/yy  

and time column ('Column2') format as: hh/mm.

 

I need to use these columns in a chart with a new calculated datetime column ('Column3') format as dd/mm/yy, hh/mm.  

( Column3 = (Table ['Column1'] + Table ['Column2'] ).

 

My problem: whatever i'm trying to do i can't get the reuierd format - dd/mm/yy

The format that i get is mm/dd/yy. Even when i'm getting the right format in the date column ('Column1'),

I can't get it right in the new calculated column ('Column3').

 

I tried to change the following:

Date format in the Excel file (Text, Date, Custom format);

Data Type in Power BI, both text and date;

Region (Location) settings in my computer;

Regional settings in Power BI (File - Options - Current file - Regional Settings);

Check and uncheck Time Intelligence Auto Date/time (File - Options - Current file - Data Load);

I also tried to split the date column, arrange the new columns in the desired format and merge again.

Nothing works.

 

My question: is there a solution through DAX or Power Query to set the desired date format regardless of the

the regional settings of the source file/computer or the Power BI Locale?

 

Thanks 

 

1 ACCEPTED SOLUTION
MFelix
Super User III
Super User III

Hi @dpbi,

On the PBI on the modelling tab you can choose the formst of the date and other fields so.you can select the order of day month and year.

If you want a dax formula you can use:

Date = Format(Table ['Column1'] + Table ['Column2'] ,"dd/mm/yy")

Regards,
MFelix

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
DominikPetri
Advocate V
Advocate V

Try

DateTime.ToText([YourDateTimeColumn],"dd/MM/yyyy")

 

Hope this helps

Dominik.

 

Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
MFelix
Super User III
Super User III

Hi @dpbi,

On the PBI on the modelling tab you can choose the formst of the date and other fields so.you can select the order of day month and year.

If you want a dax formula you can use:

Date = Format(Table ['Column1'] + Table ['Column2'] ,"dd/mm/yy")

Regards,
MFelix

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Solution works!

 

Thank you very much.

 

Dominik i will try your solution as well. 

 

Thanks again for both of you.

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors