cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JuSlaughter Frequent Visitor
Frequent Visitor

NOOB - Beginning Power BI Book DateTime Error

Hi

 

First post so please be gentle.

 

I am looking into Power BI after using Excel and Reporting Services for quite a few years. I have purchased the Beginning Power BI book and am working through it with no issues......until I get to Chapter 9.

 

I have imported a provided CSV file. It opens OK and one of the instructions is to make sure the 3 Date columns are actually set to DateTime. They aren't, they are text. So I selected Data Type Date\Time on one of the columns but it returns errors for most of the values.

 

The dates are formatted as 09/18/2017 08:00:55 AM or 09/10/2017 02:38:59 PM. It appears that the errors only occur on the AM date times.

 

Any suggestions on how I get round this issue, bearing in mind I only started looking at this today ;o)

 

Thanks

 

Ju

7 REPLIES 7
Super User IV
Super User IV

Re: NOOB - Beginning Power BI Book DateTime Error

Hmm, that's odd. I created a CSV file with those values in it and was able to successfully convert it to Date/Time data type. Can you supply a link to the CSV file?


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

Community Support Team
Community Support Team

Re: NOOB - Beginning Power BI Book DateTime Error

Hi @JuSlaughter,

 

Please share sample csv file to test, it will be help for troubleshooting.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
JuSlaughter Frequent Visitor
Frequent Visitor

Re: NOOB - Beginning Power BI Book DateTime Error

Morning, what is the best way to link a file on this forum?

 

Thanks

JuSlaughter Frequent Visitor
Frequent Visitor

Re: NOOB - Beginning Power BI Book DateTime Error

Community Support Team
Community Support Team

Re: NOOB - Beginning Power BI Book DateTime Error

Hi @JuSlaughter,

 

I test on your data but can't reproduce the issue which you mentioned. I think the issue is related to the date format.(for instance: UK date and US date)

 

I'd like to suggest you to add a custom column to transfer these date to your locale date format, it may work through your issue.

Sample:

 #"Added Custom" = Table.AddColumn(#"Changed Type", "Opened(US)", each DateTime.FromText(Text.From([Opened]),"us"))
 #"Added Custom" = Table.AddColumn(#"Changed Type", "Opened(UK)", each DateTime.FromText(Text.From([Opened]),"uk"))

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
JuSlaughter Frequent Visitor
Frequent Visitor

Re: NOOB - Beginning Power BI Book DateTime Error

Hi

 

Thanks for the response. I will give it a try although I dont fully understand at this stage of my learning where the code you have supplied should go but I will try and figure it out.

 

Thanks

JuSlaughter Frequent Visitor
Frequent Visitor

Re: NOOB - Beginning Power BI Book DateTime Error

Sorry for the delay, been stuck doing the day job and now I'm on holiday for a few weeks. Will have a look when I get back and let you know.

 

Thanks for your help.

 

Cheers

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors