Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have Text Columns for all my Address columns. It works great for 5 digit zip codes but I get error whenever it sees a 9 digit zip code 95076-1023 for example.
How do I resolve this?
Solved! Go to Solution.
I had some unexpected Applied Steps that were created when I changed source file. I deleted those out and all was good again.
I had some unexpected Applied Steps that were created when I changed source file. I deleted those out and all was good again.
The code you posted is from the 'Show errors' - it doesn't tell me much but it does tell me that you have a lot of fields in your original query and, like I said before, the zip code column looks like it has a number type.
So please amend the original query and change the column to text type
Here you go >>Solved: Type mismatch -Error when refreshing the published... - Microsoft Power BI Community
Thanks,
Ritesh
DataFormat.Error: We couldn't convert to Number.
Details:
94103-3129
That is usually the name powerbi gives to a query that shows errors . I'm really after the specific error. You can get this from within Power Query.
Can you show me the code from the Advanced editor in Power Query
---
It all looks so far as if a column is numeric but it contains text values (probably the hyphen in the example you gave above)
let
Source = LossRunToExcel,
#"Detected Type Mismatches" = let
tableWithOnlyPrimitiveTypes = Table.SelectColumns(Source, Table.ColumnsOfType(Source, {type nullable number, type nullable text, type nullable logical, type nullable date, type nullable datetime, type nullable datetimezone, type nullable time, type nullable duration})),
recordTypeFields = Type.RecordFields(Type.TableRow(Value.Type(tableWithOnlyPrimitiveTypes))),
fieldNames = Record.FieldNames(recordTypeFields),
fieldTypes = List.Transform(Record.ToList(recordTypeFields), each [Type]),
pairs = List.Transform(List.Positions(fieldNames), (i) => {fieldNames{i}, (v) => if v = null or Value.Is(v, fieldTypes{i}) then v else error [Message = "The type of the value does not match the type of the column.", Detail = v], fieldTypes{i}})
in
Table.TransformColumns(Source, pairs),
#"Added Index" = Table.AddIndexColumn(#"Detected Type Mismatches", "Row Number" ,1),
#"Kept Errors" = Table.SelectRowsWithErrors(#"Added Index", {"Insured Name", "AsOf", "Policy Number", "Policy Inception Date", "Policy Expiration Date", "Insurer", "Claim Number", "Claimant First Name", "Claimant Middle Name", "Claimant Last Name", "Loss Date", "Claim Status", "Claim Type", "Risk State", "Jurisdiction", "Gender", "Claimant Birth Date", "Claimant Age", "Claimant Hire Date", "Years Employed", "Occupation Desc", "Average Weekly Wage", "Class Code", "Closed Date", "Reopened Date", "Litigated", "Date Reported To Insurer", "Days To Report", "Date Employer Informed", "Reporting Lag", "Claims Professional", "Reporting Location Desc", "Reporting Location Address1", "Reporting Location Address2", "Reporting Location City", "Reporting Location State", "Reporting Location Zip Code", "Injury Location Desc", "Injury Location Address1", "Injury Location Address2", "Injury Location City", "Injury Location State", "Injury Location Zip Code", "Reporting Group OrgID", "Reporting Group Code Path", "Reporting Group 1", "Reporting Group 1 Code", "Reporting Group 2", "Reporting Group 2 Code", "Employee ID", "Injury Cause Desc", "Nature Of Injury Desc", "Body Part Desc", "How Injury Occurred", "Injury Desc", "Activity", "Work Start Time", "Time of Incident", "PD Rating", "Medical Incurred", "Medical Paid", "TD Incurred", "TD Paid", "PD Incurred", "PD Paid", "VR Incurred", "VR Paid", "Expense Incurred", "Expense Paid", "Total Gross Incurred", "Total Outstanding Reserve", "Total Gross Paid", "Total Recoveries", "Third Party Recoveries", "Deductible Reimbursed", "Deductible Amount", "Deductible Type", "Day", "Year", "Month", "Month of Loss Numeric", "Employee Lag", "Lagtime Reporting", "Lagtime Banding", "LOE by Day", "Reporting Location", "Incident Location", "Claimant Birth Date Text", "Claimant Name Combined", "Age Range", "LOE By Year", "LOE Range", "LOE by Year Rounded", "LOE Label1", "LOE Label2", "LOE Label2 Sort", "Time Started", "Time Injured", "Time at Work", "Time to Injury Group", "Employer Lag Range", "Overall Lag Reporting", "Overall Lag Range ", "Shift Range", "Day Order", "Employee Lag Range Days", "Employer Lag Range Days", "Policy Inception Date Text", "Employee Lag Range Days Sort", "Employer Lag Range Days Sort", "Claimant Birth Date Text and Dash", "Merged Claimant Name and Birth Date", "Merged Injury Location No Zip Code", "Injury Location Merged", "Shift", "Shift Order", "24 Hour Round", "Claim Type All", "Claim Type First Aid Med Ind", "Incident/Report Only", "Litigated Text"}),
#"Reordered Columns" = Table.ReorderColumns(#"Kept Errors", {"Row Number", "Insured Name", "AsOf", "Policy Number", "Policy Inception Date", "Policy Expiration Date", "Insurer", "Claim Number", "Claimant First Name", "Claimant Middle Name", "Claimant Last Name", "Loss Date", "Claim Status", "Claim Type", "Risk State", "Jurisdiction", "Gender", "Claimant Birth Date", "Claimant Age", "Claimant Hire Date", "Years Employed", "Occupation Desc", "Average Weekly Wage", "Class Code", "Closed Date", "Reopened Date", "Litigated", "Date Reported To Insurer", "Days To Report", "Date Employer Informed", "Reporting Lag", "Claims Professional", "Reporting Location Desc", "Reporting Location Address1", "Reporting Location Address2", "Reporting Location City", "Reporting Location State", "Reporting Location Zip Code", "Injury Location Desc", "Injury Location Address1", "Injury Location Address2", "Injury Location City", "Injury Location State", "Injury Location Zip Code", "Reporting Group OrgID", "Reporting Group Code Path", "Reporting Group 1", "Reporting Group 1 Code", "Reporting Group 2", "Reporting Group 2 Code", "Employee ID", "Injury Cause Desc", "Nature Of Injury Desc", "Body Part Desc", "How Injury Occurred", "Injury Desc", "Activity", "Work Start Time", "Time of Incident", "PD Rating", "Medical Incurred", "Medical Paid", "TD Incurred", "TD Paid", "PD Incurred", "PD Paid", "VR Incurred", "VR Paid", "Expense Incurred", "Expense Paid", "Total Gross Incurred", "Total Outstanding Reserve", "Total Gross Paid", "Total Recoveries", "Third Party Recoveries", "Deductible Reimbursed", "Deductible Amount", "Deductible Type", "Day", "Year", "Month", "Month of Loss Numeric", "Employee Lag", "Lagtime Reporting", "Lagtime Banding", "LOE by Day", "Reporting Location", "Incident Location", "Claimant Birth Date Text", "Claimant Name Combined", "Age Range", "LOE By Year", "LOE Range", "LOE by Year Rounded", "LOE Label1", "LOE Label2", "LOE Label2 Sort", "Time Started", "Time Injured", "Time at Work", "Time to Injury Group", "Employer Lag Range", "Overall Lag Reporting", "Overall Lag Range ", "Shift Range", "Day Order", "Employee Lag Range Days", "Employer Lag Range Days", "Policy Inception Date Text", "Employee Lag Range Days Sort", "Employer Lag Range Days Sort", "Claimant Birth Date Text and Dash", "Merged Claimant Name and Birth Date", "Merged Injury Location No Zip Code", "Injury Location Merged", "Shift", "Shift Order", "24 Hour Round", "Claim Type All", "Claim Type First Aid Med Ind", "Incident/Report Only", "Litigated Text"})
in
#"Reordered Columns"
Detected Type Mismatches
what's the error?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 158 | |
| 132 | |
| 116 | |
| 79 | |
| 54 |