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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Dhruv_Ranpura
Frequent Visitor

Data Refresh Issue in Power BI Service Due to Type Mismatch

Hello All,

I’m encountering a data refresh issue in Power BI Service. I’ve created a Power BI report that publishes successfully, but when I schedule an automatic refresh or try to refresh manually on the service side, I receive an error indicating a type mismatch in one of my tables.

Dhruv_Ranpura_0-1724847505391.png

The table in question is coming from SQL Server, and here’s the M-query I’m using in Power BI:
And this is my M-query for that particular tbale in PowerBI .
 let
 Source = Sql.Database("***********", "********"),
 dbo_BSEG_FI_New = Source{[Schema="dbo",Item="BSEG_FI_New"]}[Data],
 #"Sorted Rows" = Table.Sort(dbo_BSEG_FI_New,{{"H_BUDAT", Order.Ascending}}),
 #"Changed Type" = Table.TransformColumnTypes(#"Sorted Rows",{{"H_BUDAT", type date}})
 in
 #"Changed Type"

 

I’m trying to identify the root cause of the type mismatch error so that I can successfully schedule an auto-refresh for this report without any issues. Could you please help me figure out the potential reasons for this error and how to resolve it?

Any guidance would be greatly appreciated!



1 ACCEPTED SOLUTION
Dhruv_Ranpura
Frequent Visitor

I think the issue was with PowerBI file. Then I again recreated the same powerBi and I am able to shedule a refresh in PowerBI Service.

View solution in original post

4 REPLIES 4
Dhruv_Ranpura
Frequent Visitor

I think the issue was with PowerBI file. Then I again recreated the same powerBi and I am able to shedule a refresh in PowerBI Service.

pallavi_r
Skilled Sharer
Skilled Sharer

Hi @Dhruv_Ranpura ,

 

Please ensure the data source column types should be same data model column type. For debugging and identifying the root cause, I suggest pull it from view rather than table. In the view, type cast the error prone columns specifically datetime related fields.

Thanks,

Pallavi

Hi @pallavi_r ,
Thank you for your response.
I tried to create view for that table where I typecasted the date field from nvarchar to date datatype and used that view instead of original table. And then I publised that report to service it got published successfully. But, after publishing report when I am trying to refresh from service side I again got the same error.
"Data source errorThe following system error occurred: Type mismatch. Table: BSEG_FI_New."

I try one different way too I created one blank report where I connected that newly created view  and created one sample visual using some fields from that view and published that report. And, also tested to refresh that sample report from PowerBi service side it gets refreshed successfully. 
So, what to do? 



Hi @Dhruv_Ranpura 

 

Good that you tried with this approach. If you have already verified the type conversion in data source, power query transformation and model, then the probable cause could be in any of the following.

a) verify that any relationship with this table should take place using matching data types.

b)verify all dax and calculated formulas associated with table is taking place with matching data type

c)if datasource has null values, then make sure model handles it correctly with default value or as per the requirement.

Can you please check these 3 points and let me know.

Thanks,

Pallavi

 

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.