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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

Try import CSV raw data with only Date field stuck at power quary

Hi All

I have below excel CSV raw data :-

AR DATE.png

When import the above CSV file to PBI , i get stuck as below screen.

POWER QUARY.png

Hope some one advise me.

Paul Yeo

1 ACCEPTED SOLUTION

@Paulyeo11 

 

In the advanced Editor Paste this code after removing the previous Code

Please take care of File Location and Header Name (Bold and underline content) and it should work for you

Please share your Kudoes

let
Source = Csv.Document(File.Contents("C:\users\lenovo\desktop\csv test.csv")),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
Custom1 = Table.TransformColumnTypes( #"Promoted Headers",{{"AR Invoice Date",type date}})
in
Custom1




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

5 REPLIES 5
VijayP
Super User
Super User

@Paulyeo11 

In the home Tab goto advanced Editor and share the snap of it . can help you with that!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Paulyeo11
Impactful Individual
Impactful Individual

hI sIR

 

tHANK YOU FOR YOUR HELP , below is the screen shot.

ADVANCE EDITOR.png

@Paulyeo11 

 

In the advanced Editor Paste this code after removing the previous Code

Please take care of File Location and Header Name (Bold and underline content) and it should work for you

Please share your Kudoes

let
Source = Csv.Document(File.Contents("C:\users\lenovo\desktop\csv test.csv")),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
Custom1 = Table.TransformColumnTypes( #"Promoted Headers",{{"AR Invoice Date",type date}})
in
Custom1




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Paulyeo11
Impactful Individual
Impactful Individual

Hi Sir

now it got anotherr error 

new error date.png

@Paulyeo11  

I understood the problem it is because of your Regional settings you are using D/m/yy and the dates are in different format

let
Source = Csv.Document(File.Contents("File Location"),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"AR Invoice Date", type any}}),
#"Changed Type with Locale" = Table.TransformColumnTypes(#"Changed Type", {{"AR Invoice Date", type date}}, "en-IN")
in
#"Changed Type with Locale"

 

use this Code




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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