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.
Hello Everyone,
I'm facing a weird issue in Power BI Desktop,
I use import from SQL Server, it is an invoice table with some financial data and a few dates, I convert the date/time into date, but when I click on close and apply, the following error message appears:
Object reference not set to an instance of an object
In the details, I can see the following M query:
shared Invoice = let
Source = Sql.Database("PROD_Data", "DW_Datamart", [Query=" SELECT [ActionDate],#(lf)#(tab)#(tab)[BillingOffice] AS 'Billing Office'#(lf)#(tab)#(tab)[DefaultPayor] AS 'Default Payor',#(lf)#(tab)#(tab)[InvoiceDate] AS 'Invoice Date',#(lf)#(tab)#(tab)REPLACE(CONVERT (CHAR(10), [InvoiceDate], 101),'/','') AS 'InvoiceDateID',#(lf)#(tab)#(tab)[DueDate] AS 'Invoice Due Date',#(lf)#(tab)#(tab)[InvoiceNumber] AS 'Invoice Number',#(lf)#(tab)#(tab)[InvoiceFirmFiscalYear],#(lf)#(tab)#(tab)[InvoiceFirmFiscalYearLabel],#(tab)#(tab)#(lf)#(tab)#(tab)[InvoiceIndex],#(lf)#(tab)#(tab)[IsEbilled],#(lf)#(tab)#(tab)[IsPaid],#(lf)#(tab)#(tab)[IsRequireEbill],#(lf)#(tab)#(tab)[LeadMatter],#(lf)#(tab)#(tab)[NumberOfReceipts],#(lf)#(tab)#(tab)[PaidDate] AS 'Paid Date',#(lf)#(tab)#(tab)[PaidMonthYear] AS 'Paid Month Year', #(tab)#(lf)#(tab)#(tab)[PayorInvoiceCount] AS 'Payor Invoice Count',#(lf)#(tab)#(tab)[PostDate] AS 'Post Date',#(lf)#(tab)#(tab)[ReverseDate] AS 'Reverse Date',#(lf)#(tab)#(tab)[SendMonthYear] AS 'Send Month Year',#(lf)#(tab)#(tab)[SendingTimekeeper] AS 'Sending Timekeeper'#(lf)#(tab)#(tab)FROM [dbo].[VW_DimInvoice] #(lf)", CreateNavigationProperties=false]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Invoice Date", type date}, {"ActionDate", type date}, {"Invoice Due Date", type date}, {"Paid Date", type date}, {"Paid Month Year", type date}, {"Post Date", type date}, {"Reverse Date", type date}})
in
#"Changed Type";
Any idea of what is wrong?
Thank you for your help
In the Power Query Editor go on View and select the option Column Quality. Check if any column has a percentage on "Error"
I believe it is a specific line or group of lines that Power BI is not being able to convert to date probably because date is in dd/mm/yyyy and your Power BI uses mm/dd/yyyy
Thank you for your reply, but it is not the case
I ticked column profiling based on entire data set and have the following result for the data quality
So apparently, there are no errors 😕
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |